当前位置:网站首页>Redis underlying data structure -- listpack
Redis underlying data structure -- listpack
2022-06-13 07:33:00 【A hard-working dog】
listpack Introduce
Redis stay 5.0 A new data structure called listpack, The purpose is to replace compressed lists , Its biggest feature is listpack Each node in no longer contains the length of the previous node , Each node in the compressed list needs to save the length field of the previous node , There will be a hidden danger of chain update .
listpack The structure design
listpack Many excellent designs with compressed lists , such as Or use a contiguous memory space to store data compactly , And to save memory overhead ,listpack Nodes use different encoding methods to save data of different sizes .
listpack There are four parameters
Total bytes Element quantity Node node End tag

listpack entry The node structure
encoding Define the encoding type of the element , Will encode integers and strings of different lengths
data Data actually stored
len,encoding+data The total length of

listpack There is no field in the compressed list to record the length of the previous node ,listpack Only record the length of the current node , When we turn to listpack When adding a new element , It will not affect the change of the length field of other nodes , Thus, the chain update problem of compressed list is avoided .
边栏推荐
- powerdisgner逆向生成oracle数据模型
- 6. system call
- Fundamentals of assembly language: register and addressing mode
- A. Vacations (dp 贪心
- Compilation and development process of Quanzhi v3s environment
- C Advanced Programming - features
- Make cer/pfx public and private key certificates and export CFCA application certificates
- AQS - detailed explanation of reentrantlock source code
- Login registration
- Number of detection cycles "142857“
猜你喜欢

A solution to the problem that there is always a newline character when C merges multiple RichTextBox contents

Nfv basic overview

Login registration

论文笔记: 多标签学习 BP-MLL

redis-6. Redis master-slave replication, cap, Paxos, cluster sharding cluster 01

TCP协议的三次握手过程和四次挥手过程以及为什么要这样? ------一二熊猫

Oracle problem: the data in the field is separated by commas. Take the data on both sides of the comma

Mui mixed development - when updating the download app, the system status bar displays the download progress

Powerdispatcher reverse generation of Oracle data model

Through the function seaborn cubehelix_ Palette build order palette
随机推荐
FTP_ Manipulate remote files
MySQL does not recommend setting the column default value to null. Why on earth is this
B. I Hate 1111 (记忆化搜索 数论
A. Vacations (DP greed
Redis cluster parsing docker building redis cluster
Un des backtraders du cadre de quantification lit l'analyseur
The password does not take effect after redis is set
Find the first and last positions of elements in a sorted array
P6154 游走(记忆化搜索
Redis learning journey - persistence
How to stop PHP FPM service in php7
Try to use renderdoc to view the shader code of UE
Sharp weapon tcpdump
Nfv basic overview
Reflection of C # Foundation
部署RDS服务
Functions about Oracle.
[vivefocus uses the wavevr plug-in to obtain handle operation events]
What languages can be decompiled
Classification of databases