redis7.0-chinese-annotated
redis7.0-chinese-annotated copied to clipboard
增加 server.h server.c 中 redisDb、redisObject 结构的注释
增加 server.h server.c 中 redisDb、redisObject 结构的注释
已修改🙏。
------------------ 原始邮件 ------------------ 发件人: "CN-annotation-team/redis7.0-chinese-annotated" @.>; 发送时间: 2024年8月23日(星期五) 下午4:53 @.>; @.@.>; 主题: Re: [CN-annotation-team/redis7.0-chinese-annotated] 增加 server.h server.c 中 redisDb、redisObject 结构的注释 (PR #130)
@ncghost1 requested changes on this pull request.
感谢大佬的贡献🙏,发现有一些错别字,需要改一下。然后请把readme中的项目更新时间改为当前日期即可
In src/server.h: > * - * Inside the RDB file, module types are encoded as OBJ_MODULE followed - * by a 64 bit module type ID, which has a 54 bits module-specific signature - * in order to dispatch the loading to the right module, plus a 10 bits - * encoding version. */ + * 在RDB文件中,模块类型都被编码为OBJ_MODULE类型,尾随着一个64比特的模块类型ID, + * 由54bit模块特定签名决定分配真确的模块方法去加载,外加一个10比特的编码版本 */ ⬇️ Suggested change - * 由54bit模块特定签名决定分配真确的模块方法去加载,外加一个10比特的编码版本 */ + * 由54bit模块特定签名决定分配正确的模块方法去加载,外加一个10比特的编码版本 */
In src/server.h:
> @@ -920,16 +927,23 @@ typedef struct clusterSlotToKeyMapping clusterSlotToKeyMapping; * by integers from 0 (the default database) up to the max configured * database. The database number is the 'id' field in the structure. */ typedef struct redisDb { - dict dict; / The keyspace for this DB */ - dict expires; / Timeout of keys with a timeout set / - dict blocking_keys; / Keys with clients waiting for data (BLPOP)/ - dict ready_keys; / Blocked keys that received a PUSH */ - dict watched_keys; / WATCHED keys for MULTI/EXEC CAS / - int id; / Database ID / - long long avg_ttl; / Average TTL, just for stats / - unsigned long expires_cursor; / Cursor of the active expire cycle. */ - list defrag_later; / List of key names to attempt to defrag one by one, gradually. */ - clusterSlotToKeyMapping slots_to_keys; / Array of slots to keys. Only used in cluster mode (db 0). */ + dict dict; / 存储field-value pairs 的字典 */ + dict expires; / 每个key的过期时间 */ + dict blocking_keys; / 当客户端使用 BLPOP 命令列表元素时,会把 key + * 写到 blocking_keys 中,value 是被阳塞的客户端 / ⬇️ Suggested change - * 写到 blocking_keys 中,value 是被阳塞的客户端 / + * 写到 blocking_keys 中,value 是被阻塞的客户端 /
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.>
感恩大佬~还有因为贡献超过了50行,刚刚向大佬发出了组织邀请,请注意邮件。如果不想加入可以无视~