Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
chashmap
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • redox-os
  • chashmap
  • Issues
  • #12

Closed
Open
Opened Jun 25, 2020 by Ruslan Mustakov@endragor

Different behavior between upsert and alter with regards to key identity

With methods such as upsert and alter the important part of behavior is what they do with they key when the value if updated. Even if keys are equal, their identity may be (and often is) actually different and this is important for certain applications.

In chashmap library it is not documented what happens to key in those methods. In the current implementation they do opposite things: upsert preserves the old key on updates, while alter always inserts the new key. The behavior of upsert makes much more sense to me.

At the very least this should be documented, and ideally the behavior should be consistent.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: redox-os/chashmap#12