Repository navigation
DOC-7267 Clean up the NRedisStack sync and async entries - #4499
Open
andy-stark-redis wants to merge 1 commit into
Open
andy-stark-redis wants to merge 1 commit into
andy-stark-redis wants to merge 1 commit into
Conversation
The sweep behind #4482 and #4476 left four kinds of defect in the nredisstack lists, found by checking each entry against NRedisStack 1.8.0 and StackExchange.Redis 3.4.31 by reflection. 152 command files change; no other client key and only SUBSTR in the status file. Removed: 30 expression-text entries, lines copied out of method bodies such as StringIncrement(key, -value, flags) with return type "return" and every param typed Any (INCR, INCRBY, INCRBYFLOAT, GET, HINCRBYFLOAT, ZINCRBY, ZREM, JSON.SET and the blocking list commands); 16 Async-named entries that had landed in sync lists (BITCOUNT, BITOP, GEODIST, SETBIT and others, each with a sync twin already present); 4 GetRange(double value, Exclude exclude, bool isStart) entries, a private sorted-set helper that GETRANGE and SUBSTR had picked up; 3 async HSCAN, SSCAN and ZSCAN entries that were the synchronous four-argument overload under its sync name; and 325 exact duplicates inside a single list, up to three copies of one signature. Replaced: KEYS and SCAN described a Keys(pattern, pageSize, cursor, pageOffset, flags) with no database parameter and an async twin that was not named KeysAsync. The method is IServer.Keys (database = -1 first), which issues KEYS or SCAN depending on the server, and the async form is KeysAsync returning IAsyncEnumerable. Both now say so. SUBSTR had only the helper entry, and neither library has a SUBSTR method, so its two lists are empty and the status file marks both generic_only. Added: 37 async entries for the 30 commands that had a sync list and no async key, the 7 blocking list and sorted-set pops (BLPopAsync and the others, which are NRedisStack extension methods on IDatabase) and the 23 JSON.* commands (IJsonCommandsAsync). Each takes its sync entry's params and descriptions with Async added to the name, and every one matches a method on the released assembly by parameter names and types. JSON.GET's sync return type "public T?" is now "T?". Learned: copying entries by list index let a sync list absorb async entries and an async list absorb sync ones, so check names and duplicates after any bulk rewrite Constraint: IServer.Keys is the only SE.Redis method for KEYS and SCAN, there is no Scan method Directive: do not list a private helper or a line copied from a method body as an API entry, check the entry against the released assembly Gaps: overload selection per command was not reviewed (INCRBYFLOAT still lists the long overload, HINCRBY lists HashDecrement) Gaps: JSON.SET lists only the RedisValue overload, not the object overload or the fpha parameter that 1.8.0 has Gaps: scan entries still show the source default RedisBase.CursorUtils.DefaultLibraryPageSize instead of 250 Recheck: when NRedisStack ships a release after 1.8.0, rerun the reflection check Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Contributor
🧠 Redis MemoryFound 5 related items from repository history (5 new this commit):
Memory updated at 5a4c5e9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The remaining NRedisStack items from DOC-7267, found by checking every entry against NRedisStack 1.8.0 and StackExchange.Redis 3.4.31 by reflection. 152 command files change. No other client's key changes, and the only status-file change is SUBSTR.
nredisstack_*lists:return, params typedAny)....Async-named entries sitting in sync lists, each with a sync twin already present.GetRange(double value, Exclude exclude, bool isStart)entries, a private sorted-set helper that GETRANGE and SUBSTR had picked up.IServer.Keys(int database = -1, ...)andKeysAsync. The old entries had nodatabaseparameter, and noScanmethod exists. SUBSTR has no library method, so its lists are empty and the status file marks both asgeneric_only.JSON.*commands. Each takes its sync entry's params and descriptions, and every one matches a method on the released assembly by parameter names and types.public T?becomesT?.Review notes
data/command-api-mapping.jsonequals a fresh regeneration from the per-command files.unsupportedfornredisstack_asyncin the status file, because SE.Redis has noShutdownAsync.content/develop/clientsignored (the full site only builds in CI). BLPOP async, GET sync, KEYS async, and SUBSTR sync and async render as expected.longoverload, HINCRBY lists HashDecrement).RedisValueoverload, not theobjectoverload or thefphaparameter.RedisBase.CursorUtils.DefaultLibraryPageSizeinstead of 250.Task<bool> AddAsync(...)), while others do not.🤖 Generated with Claude Code
Note
Low Risk
Touched files are generated documentation/JSON only; risk is mis-documented API surface for readers, not runtime or security behavior.
Overview
Aligns the per-command JSON under
data/command-api-mapping/with NRedisStack (reflection against shipped assemblies): strips hundreds of duplicatenredisstack_sync/nredisstack_asyncblocks, removes bad scrapes (e.g. body snippets withAny/return,Asyncoverloads in sync-only lists, misplaced helpers such as privateGetRangeon string commands, and redundant geo/hash/string overloads).Adds missing
nredisstack_asyncsignatures where only sync existed—blocking list/sorted-set commands (BLPOP,BRPOP,BLMOVE-related moves,BLMPOP,BZMPOP,BZPOPMAX/BZPOPMIN,BRPOPLPUSH) and JSON.ARRLEN (ArrLenAsync)—with typed parameters and task return types.Status:
command-api-mapping-status.jsonnow recordsSUBSTRfor NRedisStack sync/async asgeneric_only(no dedicated library methods).Other clients’ mappings in the diff are unchanged aside from these cleanups; known gaps (overload choice, some SCAN defaults, etc.) are called out in the PR description.
Reviewed by Cursor Bugbot for commit 5a4c5e9. Bugbot is set up for automated code reviews on this repo. Configure here.