facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
27.9k stars 6.21k forks source link

Fix a couple of issues in the stress test for Transaction::MultiGet #12696

Closed ltamasi closed 1 month ago

ltamasi commented 1 month ago

Summary: Two fixes: 1) Random::Uniform(n) returns an integer from the interval [0, n - 1], so Uniform(2) returns 0 or 1, which means is that we have apparently never covered transactions with deletions in the test. (To prevent similar issues, the patch cleans this write logic up a bit using an enum class for the type of write.) 2) The keys passed in to TestMultiGet can have duplicates. What this boils down to is that we have to keep track of the latest expected values for read-your-own-writes on a per-key basis.

Differential Revision: D57750212

facebook-github-bot commented 1 month ago

This pull request was exported from Phabricator. Differential Revision: D57750212

facebook-github-bot commented 1 month ago

This pull request was exported from Phabricator. Differential Revision: D57750212

facebook-github-bot commented 1 month ago

This pull request has been merged in facebook/rocksdb@f044b6a6ad812443345ad4a6f680072930379b3b.