Skip to content

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

@yuhangm000

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
}

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