Skip to content

find method may throw error after set due to nil value in current_weights #57

@djx30103

Description

@djx30103

When using SWRR mode, calling set(id, new_weight) for a new node that didn’t exist before can cause the find method to fail because current_weights[id] is nil.
This happens since set only updates nodes but does not initialize current_weights for the new node.

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