当前位置:网站首页>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 .
边栏推荐
- Related operations under Oracle Database
- Deploy RDS service
- A solution to the problem that there is always a newline character when C merges multiple RichTextBox contents
- P6154 wandering (memory search
- oracle问题,字段里面的数据被逗号隔开,取逗号两边数据
- 量化框架backtrader之一文讀懂Analyzer分析器
- Precautions for passing parameters with byte array
- How to solve the 404 problem
- [Yu Yue education] econometrics reference materials of Jiujiang University
- RT thread simulator lvgl control: button button event
猜你喜欢
[log4j2 log framework] sensitive character filtering
Export chrome plug-ins and import local plug-ins to chrome
Redis learning journey --redis Conf details
JMeter encryption interface test
[vivefocus uses the wavevr plug-in to obtain handle operation events]
Consistency under distributed
量化框架backtrader之一文讀懂Analyzer分析器
Distributed transaction learning (I) preliminary understanding
Implementation of fruit mall wholesale platform based on SSM
Through the function seaborn cubehelix_ Palette build order palette
随机推荐
Lightning data import
It's called the next generation monitoring system. Let's see how awesome it is
I always don't understand the high address and high position
Calculate running total / running balance
C # Advanced Programming - Feature Section
Tidb data migration (DM) Introduction
5. interrupts and exceptions
Un des backtraders du cadre de quantification lit l'analyseur
Redis learning journey - transaction
Redis learning journey sentinel mode
P6154 wandering (memory search
在排序数组中查找元素的第一个和最后一个位置
全志V3S环境编译开发流程
No configure file found when compiling PHP from source code
How to stop PHP FPM service in php7
C # related knowledge points
Time field comparison time size in MySQL
关于oracle的函数。
关于#etl#的问题:io.trino.jdbc.TrinoDriver
Compilation and development process of Quanzhi v3s environment