Closed wangshao1 closed 2 weeks ago
The changes introduce a std::string&& prefetch_meta
parameter to several methods in the Redis
class across different data structure modules. This enhancement aims to improve efficiency in handling meta information related to expiration, deletion, persistence, and time-to-live operations, adding consistency and optimization across various Redis data types like Strings, Hashes, Lists, Sets, Zsets, and Streams.
File Path | Change Summary |
---|---|
src/storage/src/redis.h | Added std::string&& prefetch_meta parameter to multiple Redis class methods for expiration, deletion, persistence, TTL, and cardinality operations. |
src/storage/src/redis_hashes.cc | Updated Redis class methods for Hashes to include std::string&& prefetch_meta parameter for handling meta information. |
src/storage/src/redis_lists.cc | Added std::string&& prefetch_meta parameter to Redis class methods for Lists, affecting expiration, deletion, persistence, and TTL operations. |
src/storage/src/redis_sets.cc | Updated Redis class methods for Sets to accept an additional std::string&& prefetch_meta parameter for enhanced meta handling. |
src/storage/src/redis_streams.cc | Modified Redis class methods for Streams to include std::string&& prefetch_meta for stream processing and metadata handling. |
src/storage/src/redis_strings.cc | Refactored Redis class methods for Strings to accept std::string&& prefetch_meta parameter; improved consistency and meta value handling. |
src/storage/src/redis_zsets.cc | Enhanced Zset-related methods in the Redis class by adding std::string&& prefetch_meta ; reorganized variable declarations and initialization. |
src/storage/src/storage.cc | Updated Storage::MSetnx logic to directly check for key existence using the IsExist method rather than retrieving and checking the value. |
π
In the land of Redis, with keys held tight, Meta flows swift with newfound might.
Prefetch dreams and TTL gleams,
Through Hashes, Lists, and Streams.
Efficiency whispers, a silent delight,
In βstorageβ we code, from morning till night.
The rabbit cheers with coding spree, For optimizations set us free! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
fix bugs mentioned in https://github.com/OpenAtomFoundation/pika/issues/2735
Summary by CodeRabbit
New Features
Refactor
prefetch_meta
parameter, optimizing metadata handling.Bug Fixes
exists = true
and returningStatus::OK()
in specific conditions.Performance Improvements