danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Rely on read tx for the hashtable consistency #434

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

Now that every operation on the hashtable is always behind a read or write transaction, it's not necessary to have to rely on a tricky logic and memory fences to ensure that a read will never cause an issue if a write changes something as they will never run in parallel.

The PR drops the memory fences, introduces some minor optimizations now that reads are consistent and clean up a lot of unnecessary logging.

The PR also contains a minor fix for a build warning when building C++ code (e.g. benchmarks or tests) and the necessary changes to update the set benchmark for the hashtable to the new paradigm implemented.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...hashtable/mcmp/hashtable_support_hash_search_avx.h 100.00% <100.00%> (ø)
...ashtable/mcmp/hashtable_support_hash_search_avx2.h 100.00% <100.00%> (ø)
...ashtable/mcmp/hashtable_support_hash_search_loop.h 100.00% <100.00%> (ø)
src/thread.h 100.00% <ø> (ø)
src/transaction.h 95.00% <100.00%> (+0.13%) :arrow_up:
src/storage/db/storage_db.c 59.80% <66.67%> (+0.10%) :arrow_up:
...uctures/hashtable/mcmp/hashtable_support_op_arch.c 92.81% <87.50%> (-0.23%) :arrow_down:

... and 1 file with indirect coverage changes

:loudspeaker: Thoughts on this report? Let us know!.