Skip to content

I have a confuse with the code, why 1/4th ? #30

Description

@yuhangm000

I have a confuse that Line 265 in consistent.go.

//reallocate if we're holding on to too much (1/4th)
if cap(c.sortedHashes)/(c.NumberOfReplicas*4) > len(c.circle) {
hashes = nil
}

You stated that it is 1/4, how about this bellow.

if cap(c.sortedHashes)/4 > len(c.circle) {
hashes = nil
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions