Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7891839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:43:10+00:00 2026-06-03T06:43:10+00:00

In redis.h , the skipnode is defined as below: typedef struct zskiplistNode { robj

  • 0

In redis.h, the skipnode is defined as below:

typedef struct zskiplistNode {
    robj *obj;
    double score;
    struct zskiplistNode *backward;
    struct zskiplistLevel {
        struct zskiplistNode *forward;
        unsigned int span;
    } level[];
} zskiplistNode;

What does the var span mean? What does this var store?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:43:12+00:00Added an answer on June 3, 2026 at 6:43 am

    span at a particular node stores the number of nodes between the current node and node->forward at the current level. span is used to calculate the 1-based rank of element in the skip list.

    For example, consider the following skip list :
    A Skip List

    Consider the head node. The span at all levels will be 1.

    Consider node 1. At level 0, the span is 1, because you will span 1 element if you follow the forward pointer. At level 1, span is 2 because you will span 2 elements (node 2 and node 3) if you follow the forward pointer.

    Take a look at the function zslGetRank in t_zet.c. You can see how the rank is calculated from the value of span at each level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If redis gets overloaded, can I configure it to drop set requests? I have
Can I configure Redis slave to stop saving dumps? I have omitted all save
Suppose you have a LIST datatype in Redis. How do you delete all its
I'm currently using Socket.IO with redis store. And I'm using Room feature with it.
I have substitute my memcache with Redis. I use the phpredis client and the
How to check whether the Redis server is running? If it's not running, I
Suppose I do this in redis at 13:30 20 Feb 2020 , > set
I am pretty new to Redis. I downloaded Jedis and added that to my
I am trying to use redis and redis-store with rails 3.1; however I seem
Redis really seems like a great product with the built in replication and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.