https://github.com/facebook/rocksdb
Revision af7872ffd1fb437c663430d29a5d6e674db1ca90 authored by Yu Zhang on 24 February 2023, 01:00:04 UTC, committed by Facebook GitHub Bot on 24 February 2023, 01:00:04 UTC
Summary: Stressing small DB with small number of keys and user-defined timestamp enabled usually fails pretty quickly in TestGet. Example command to reproduce the failure: ` tools/db_crashtest.py blackbox --enable_ts --simple --delrangepercent=0 --delpercent=5 --max_key=100 --interval=3 --write_buffer_size=262144 --target_file_size_base=262144 --max_bytes_for_level_base=262144 --subcompactions=1` Example failure: `error : inconsistent values for key 0000000000000009000000000000000A7878: expected state has the key, Get() returns NotFound.` Fixes this test failure by refreshing the read up to timestamp to the most up to date timestamp, a.k.a now, after a key is locked. Without this, things could happen in this order and cause a test failure: <table> <tr> <th>TestGet thread</th> <th> A writing thread</th> </tr> <tr> <td>read_opts.timestamp = GetNow()</td> <td></td> </tr> <tr> <td></td> <td>Lock key, do write</td> </tr> <tr> <td>Lock key, read(read_opts) return NotFound</td> <td></td> </tr> </table> Pull Request resolved: https://github.com/facebook/rocksdb/pull/11249 Reviewed By: ltamasi Differential Revision: D43551302 Pulled By: jowlyzhang fbshipit-source-id: 26877ab379bdb97acd2682a2632bc29718427f38
1 parent f007b8f
Tip revision: af7872ffd1fb437c663430d29a5d6e674db1ca90 authored by Yu Zhang on 24 February 2023, 01:00:04 UTC
Fix a TestGet failure when user defined timestamp is enabled (#11249)
Fix a TestGet failure when user defined timestamp is enabled (#11249)
Tip revision: af7872f
File | Mode | Size |
---|---|---|
.circleci | ||
.github | ||
buckifier | ||
build_tools | ||
cache | ||
cmake | ||
coverage | ||
db | ||
db_stress_tool | ||
docs | ||
env | ||
examples | ||
file | ||
fuzz | ||
include | ||
java | ||
logging | ||
memory | ||
memtable | ||
microbench | ||
monitoring | ||
options | ||
plugin | ||
port | ||
table | ||
test_util | ||
third-party | ||
tools | ||
trace_replay | ||
util | ||
utilities | ||
.clang-format | -rw-r--r-- | 138 bytes |
.gitignore | -rw-r--r-- | 1.0 KB |
.lgtm.yml | -rw-r--r-- | 67 bytes |
.watchmanconfig | -rw-r--r-- | 130 bytes |
AUTHORS | -rw-r--r-- | 322 bytes |
CMakeLists.txt | -rw-r--r-- | 56.8 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 3.3 KB |
CONTRIBUTING.md | -rw-r--r-- | 706 bytes |
COPYING | -rw-r--r-- | 17.7 KB |
DEFAULT_OPTIONS_HISTORY.md | -rw-r--r-- | 1.5 KB |
DUMP_FORMAT.md | -rw-r--r-- | 763 bytes |
HISTORY.md | -rw-r--r-- | 273.7 KB |
INSTALL.md | -rw-r--r-- | 7.9 KB |
LANGUAGE-BINDINGS.md | -rw-r--r-- | 1.3 KB |
LICENSE.Apache | -rw-r--r-- | 11.1 KB |
LICENSE.leveldb | -rw-r--r-- | 1.5 KB |
Makefile | -rw-r--r-- | 99.3 KB |
PLUGINS.md | -rw-r--r-- | 705 bytes |
README.md | -rw-r--r-- | 2.0 KB |
TARGETS | -rw-r--r-- | 658.3 KB |
USERS.md | -rw-r--r-- | 8.4 KB |
Vagrantfile | -rw-r--r-- | 1017 bytes |
WINDOWS_PORT.md | -rw-r--r-- | 12.5 KB |
common.mk | -rw-r--r-- | 963 bytes |
crash_test.mk | -rw-r--r-- | 4.2 KB |
issue_template.md | -rw-r--r-- | 294 bytes |
rocksdb.pc.in | -rw-r--r-- | 292 bytes |
src.mk | -rw-r--r-- | 45.8 KB |
thirdparty.inc | -rw-r--r-- | 7.8 KB |
Computing file changes ...