Redis data structure ziplist

Foreword In order to improve memory efficiency, Redis designed a special data structure ziplist (compressed list). The essence of ziplist is a byte array, which adopts a compact and continuous storage format, which can effectively compress data and improve memory efficiency. When the data volume of hash and zset is relatively small, ziplist will be […]

The underlying implementation of Redis ordered collection zset – ZipList (compressed list) and SkipList (skip list)

1. Description zset is an ordered set, and the key of zset is non-repeatable. 2. Function Commonly used for functions such as rankings 3. Use commands 1. Add: zadd zadd [ redis_key ] [ zset_key ] [ zset_value ] … example: zadd player 99 Xiaobai 87 Xiaohong 2.5 Wutiao 2. Delete: zrem Example: Delete Xiaohong […]

Redis source code ZipList compression list

The three data types List (before version 3.2), Hash and Sorted Set can all use compressed lists (ziplist) to save data. The underlying quickList of the new version of Redis also uses zipList support. The Redis version is updated frequently, and this article does not guarantee timeliness. 1. ziplist structure ziplist is a special doubly […]

8.Redis data structure ZipList

highlight: arduino-light ZipList Arrays store not objects but references to objects Let’s look at a piece of pseudo code first. The pseudo code is as follows: java List list = new ArrayList(); ? list.add(1); ? Integer element = list.get(0); ? list.remove( 0); ? System.out.println(element); The general operation is to first use get to get an […]

ConcurrentSkipListMap source code solution

ConcurrentSkipListMap source code solution Previously we learned about the implementation of ConcurrentHashMap. In this article we will learn about Map combination based on skip table implementation. Introduction of core members private static final Object BASE_HEADER = new Object(); // Special value of the head of the data linked list private transient volatile HeadIndex<K,V> head; // […]

Redis data structure – QuickList, SkipList, RedisObjective

Following the above, this article mainly introduces QuickList, SkipList, RedisObjective 4. Redis data structure – QuickList Question 1: Although ZipList saves memory, the application memory must be a continuous space. If the memory occupies a lot, the application memory efficiency is very low. what to do? ? Answer: In order to alleviate this problem, we […]

SkipList_DB source code analysis

SkipList_DB Table of Contents 1. Source code analysis 2. Node node class member attribute member function 3. SkipList jump list class member attribute member method 1. Constructor and destructor 2. get_random_value 3. create_node 4. Insert data insert_element 5. Display data display_list 6. Find data search_element 7. Delete data delete_element 8. Data dump dump_file 9. Load […]

“Redis” SkipList bottom layer implementation and application

“Redis” SkipList bottom layer implementation and application References & Acknowledgments Do you really understand the underlying data structure skiplist of ZSet in Redis? Riemann Chow In-depth understanding of skip table and its application in Redis JD Cloud Developer Bottom layer implementation of Redis jump table Article directory “Redis” SkipList bottom layer implementation and application @[toc] […]