Add JSON-based deep prefetching for hash and zset inner hashtables#17
Merged
Merged
Conversation
Extends the memory prefetch system to walk inner hashtables for hash (OBJ_ENCODING_HASHTABLE) and sorted set (OBJ_ENCODING_SKIPLIST) types. Commands declare which argv position holds the field/member lookup key via member_key_index in their JSON spec. Supports multi-field commands via member_key_step (stride) and member_key_count (limit). 22 commands annotated: HGET, HEXISTS, HSTRLEN, HINCRBY, HINCRBYFLOAT, HSETNX, HDEL, HMGET, HSET, HMSET, HGETDEL, HPERSIST, HEXPIRETIME, HPEXPIRETIME, HTTL, HPTTL, ZSCORE, ZRANK, ZREVRANK, ZREM, ZMSCORE, ZINCRBY. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
- Store per-key argv/argc in batch instead of relying on client->argv (fixes wrong field lookup for queued/pipelined commands) - Clear key_clients entries in removeClientFromPendingCommandsBatch (prevents use-after-free on client disconnect) - Remove unreachable dead code after exhaustive switch - Add TCL integration test for deep prefetch with io-threads Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
key_clients is no longer needed since we store per-key argv/argc directly. The client param in addCommandToBatch was only used to populate key_clients. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
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.
No description provided.