Skip to content

Commit

Permalink
Fix TestGetEntity in stress test when UDT is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykorean committed Jan 10, 2024
1 parent 1de6940 commit bc4bf89
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion db_stress_tool/no_batched_ops_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,17 @@ class NonBatchedOpsStressTest : public StressTest {

PinnableWideColumns from_db;

ReadOptions read_opts_copy = read_opts;
std::string read_ts_str;
Slice read_ts_slice;
if (FLAGS_user_timestamp_size > 0) {
read_ts_str = GetNowNanos();
read_ts_slice = read_ts_str;
read_opts_copy.timestamp = &read_ts_slice;
}
bool read_older_ts = MaybeUseOlderTimestampForPointLookup(
thread, read_ts_str, read_ts_slice, read_opts_copy);

const Status s = db_->GetEntity(read_opts, cfh, key, &from_db);

int error_count = 0;
Expand Down Expand Up @@ -956,7 +967,7 @@ class NonBatchedOpsStressTest : public StressTest {
} else if (s.IsNotFound()) {
thread->stats.AddGets(1, 0);

if (!FLAGS_skip_verifydb) {
if (!FLAGS_skip_verifydb && !read_older_ts) {
ExpectedValue expected =
shared->Get(rand_column_families[0], rand_keys[0]);
if (ExpectedValueHelper::MustHaveExisted(expected, expected)) {
Expand Down

0 comments on commit bc4bf89

Please sign in to comment.