Über Open CoDE Software Wiki Diskussionen Gitlab

Skip to content

Use MVCC concurrent hash map to avoid blocking readers on cache updates for auto-classify results.

The necessary adjustments to go from RwLock<HashMap<_, _>> to ConcHashMap<_, _> are pretty small for us:

  • The concurrent maps do not support Serde, i.e. we (de-)serialize a normal hash map and turn it into a concurrent one. Contributed Serde support upstream.
  • The concurrent maps do not implement Debug and hence we have to remove the derived implementations.
  • The API provided by the concurrent maps is a bit simpler than what hashbrown has, e.g. no entry method, no indexing via [..].

Still a draft as I working with upstream to figure out a few remaining API improvements which would make the code nicer here as well.

Edited by Adam Reichold

Merge request reports