Skip to content
Snippets Groups Projects
  • Arseny Kapoulkine's avatar
    3af93a39
    Clarify a note about compact hash behavior during move · 3af93a39
    Arseny Kapoulkine authored
    After move some nodes in the hash table can have keys that point to
    other; this makes the table somewhat larger but this does not impact
    correctness.
    
    The reason is that for us to access a key in the hash table, there
    should be a compact_pointer/string object with the state indicating that
    it is stored in a hash table, and with the address matching the key. For
    this to happen, we had to have put this object into this state which
    would mean that we'd overwrite the hash entry with the new, correct
    value.
    
    When nodes/pages are being removed, we do not clean up keys from the
    hash table - it's safe for the same reason, and thus move doesn't
    introduce additional contracts here.
    3af93a39
    History
    Clarify a note about compact hash behavior during move
    Arseny Kapoulkine authored
    After move some nodes in the hash table can have keys that point to
    other; this makes the table somewhat larger but this does not impact
    correctness.
    
    The reason is that for us to access a key in the hash table, there
    should be a compact_pointer/string object with the state indicating that
    it is stored in a hash table, and with the address matching the key. For
    this to happen, we had to have put this object into this state which
    would mean that we'd overwrite the hash entry with the new, correct
    value.
    
    When nodes/pages are being removed, we do not clean up keys from the
    hash table - it's safe for the same reason, and thus move doesn't
    introduce additional contracts here.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.