Skip to content

Wrong implementation of hashmap.Del() #4

Description

@aathan

Del() appears to have a fatal flaw: Since getBucket() only holds the hashmap lock ephemerally, the node being deleted could end up in a different bucket between get getBucket() and the del(). The read lock must be held across the operation!

How thoroughly has this been tested under concurrent loads?

EDIT: And I'm finding other problems as well. Assess this code carefully before you use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions