Skip to content

Conversation

@mulugetam
Copy link
Contributor

@mulugetam mulugetam commented Oct 20, 2025

This update fixes two bugs and adds one performance improvement:

  1. Avoids the use of operator[] when accessing std::map, which can unintentionally insert default values.
  2. Ensures that the delete operator is called only for pointer types.
  3. Improves performance by using std::shared_lock<std::shared_mutex> instead of std::unique_lock<std::shared_mutex>, allowing concurrent read access.
  4. Adds tests for ShardedMap.

@asonje
Copy link
Contributor

asonje commented Oct 24, 2025

could you add tests where possible

@mulugetam
Copy link
Contributor Author

Looks like ShardedMap doesn’t have any test coverage yet. I’ll check it out and add some.

@mulugetam mulugetam force-pushed the map_bug_and_concurrency branch 2 times, most recently from a5117c7 to b2955d1 Compare October 28, 2025 07:39
- Fix bug related to std::map
- Enable concurrent reads in ShardedMap
- Eliminate use of raw pointers

Signed-off-by: Mulugeta Mammo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants