diff options
author | Lu JJ <41555481+ncghost1@users.noreply.github.com> | 2022-04-28 13:36:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 08:36:40 +0300 |
commit | 02080f2686040cd927c24e8009fc33744cb16a3b (patch) | |
tree | c9806dc8d93c61bf06c5a575891e76b598524994 | |
parent | 6c65345edb891da558a6cf53861e98bf2e0dbb63 (diff) | |
download | redis-02080f2686040cd927c24e8009fc33744cb16a3b.tar.gz |
add comment to 'container' in 'quicklist.h' (#10656)
add a comment to `container` in `quicklist.h`.
Because `PLAIN` and `PACKED` are not as easy to understand as `NONE`
and `LISTPACK` and we don't have a detailed comment on it.
Co-authored-by: Oran Agra <oran@redislabs.com>
-rw-r--r-- | src/quicklist.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicklist.h b/src/quicklist.h index 8d6951b62..4d87fea6f 100644 --- a/src/quicklist.h +++ b/src/quicklist.h @@ -39,7 +39,7 @@ * We use bit fields keep the quicklistNode at 32 bytes. * count: 16 bits, max 65536 (max lp bytes is 65k, so max count actually < 32k). * encoding: 2 bits, RAW=1, LZF=2. - * container: 2 bits, PLAIN=1, PACKED=2. + * container: 2 bits, PLAIN=1 (a single item as char array), PACKED=2 (listpack with multiple items). * recompress: 1 bit, bool, true if node is temporary decompressed for usage. * attempted_compress: 1 bit, boolean, used for verifying during testing. * extra: 10 bits, free for future use; pads out the remainder of 32 bits */ |