Conversation
…that introduces plugin-level striped mutex row locks for high-contention workloads like tpc-c. when disabled, tidesdb uses its native optimistic mvcc semantics with write-write conflict detection at commit time — ideal for low-contention oltp, analytics, and write-heavy workloads. when enabled, row locks are acquired in index_read_map() for exact pk lookups and in update_row()/delete_row() for scan-based mutations, held until commit or rollback. isolation is downgraded to read_committed since row locks already serialize access, avoiding redundant snapshot conflict checks. the stripe array uses xxh3_64bits() from tidesdb's bundled xxhash.h for faster hashing and better distribution on short pk keys, replacing the earlier fnv-1a approach. stripe count is configurable via a new read-only sysvar tidesdb_row_lock_stripes (default 1024, range 64–65536), dynamically allocated at plugin init and freed at deinit. locks are tracked per-transaction in tidesdb_trx_t and released in commit, rollback, and connection close. mtr tests confirm correctness under concurrent updates, two concurrent updates correctly produced d_next_o_id = 3004 and four concurrent updates produced d_next_o_id = 5005; also lastly updated read me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…that introduces plugin-level striped mutex row locks for high-contention workloads like tpc-c. when disabled, tidesdb uses its native optimistic mvcc semantics with write-write conflict detection at commit time — ideal for low-contention oltp, analytics, and write-heavy workloads. when enabled, row locks are acquired in index_read_map() for exact pk lookups and in update_row()/delete_row() for scan-based mutations, held until commit or rollback. isolation is downgraded to read_committed since row locks already serialize access, avoiding redundant snapshot conflict checks. the stripe array uses xxh3_64bits() from tidesdb's bundled xxhash.h for faster hashing and better distribution on short pk keys, replacing the earlier fnv-1a approach. stripe count is configurable via a new read-only sysvar tidesdb_row_lock_stripes (default 1024, range 64–65536), dynamically allocated at plugin init and freed at deinit. locks are tracked per-transaction in tidesdb_trx_t and released in commit, rollback, and connection close. mtr tests confirm correctness under concurrent updates, two concurrent updates correctly produced d_next_o_id = 3004 and four concurrent updates produced d_next_o_id = 5005; also lastly updated read me