Skip to content

Commit

Permalink
fix asc
Browse files Browse the repository at this point in the history
  • Loading branch information
cbi42 committed Feb 19, 2025
1 parent c341e95 commit 61f8e10
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions utilities/transactions/transaction_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9488,7 +9488,7 @@ TEST_P(CommitBypassMemtableTest, MergeAndMultiCF) {
TransactionOptions txn_opts;
txn_opts.commit_bypass_memtable = true;
Transaction* txn = txn_db->BeginTransaction(wopts, txn_opts);
txn->SetName("xid1");
ASSERT_OK(txn->SetName("xid1"));
ASSERT_OK(txn->Put(handles_[0], "k1", "v1"));
ASSERT_OK(txn->Merge(handles_[0], "k1", "v2"));

Expand Down Expand Up @@ -9521,7 +9521,7 @@ TEST_P(CommitBypassMemtableTest, MergeAndMultiCF) {
// Data in mutable memtable
txn_opts.commit_bypass_memtable = false;
txn = txn_db->BeginTransaction(wopts, txn_opts, txn);
txn->SetName("xid2");
ASSERT_OK(txn->SetName("xid2"));
ASSERT_OK(txn->Merge(handles_[0], "k1", "v3"));
ASSERT_OK(txn->Merge(handles_[1], "count", buf_count));
ASSERT_OK(txn->Prepare());
Expand Down Expand Up @@ -9609,7 +9609,7 @@ TEST_P(CommitBypassMemtableTest, MergeMiniStress) {
std::unique_ptr<Transaction> txn{
txn_db->BeginTransaction(wopts, txn_opts)};
const int txn_count = i / kBatchSize;
txn->SetName("xid" + std::to_string(txn_count));
ASSERT_OK(txn->SetName("xid" + std::to_string(txn_count)));

const Snapshot* snapshot = txn_db->GetSnapshot();
// Remember the state for the snapshot
Expand Down
28 changes: 14 additions & 14 deletions utilities/write_batch_with_index/write_batch_with_index_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4166,26 +4166,26 @@ TEST_F(WBWIMemTableTest, WBWIMemTableWithMerge) {
wbwi_mem->AssignSequenceNumbers(assigned_seq);

// Update then Merge
wbwi->Put("a", "a1");
wbwi->Merge("a", "a2");
wbwi->Merge("a", "a3");
wbwi->Delete("b");
wbwi->Merge("b", "b1");
ASSERT_OK(wbwi->Put("a", "a1"));
ASSERT_OK(wbwi->Merge("a", "a2"));
ASSERT_OK(wbwi->Merge("a", "a3"));
ASSERT_OK(wbwi->Delete("b"));
ASSERT_OK(wbwi->Merge("b", "b1"));

// Merge then Update
wbwi->Merge("c", "c1");
wbwi->Put("c", "c2");
wbwi->Merge("d", "d1");
wbwi->Merge("d", "d2");
wbwi->Delete("d");
ASSERT_OK(wbwi->Merge("c", "c1"));
ASSERT_OK(wbwi->Put("c", "c2"));
ASSERT_OK(wbwi->Merge("d", "d1"));
ASSERT_OK(wbwi->Merge("d", "d2"));
ASSERT_OK(wbwi->Delete("d"));

// Just Merge
wbwi->Merge("e", "e1");
wbwi->Merge("f", "f1");
wbwi->Merge("f", "f2");
ASSERT_OK(wbwi->Merge("e", "e1"));
ASSERT_OK(wbwi->Merge("f", "f1"));
ASSERT_OK(wbwi->Merge("f", "f2"));

// Just Update
wbwi->SingleDelete("g");
ASSERT_OK(wbwi->SingleDelete("g"));

// key <-> val
// Refer to the sequence number assignment method described in the comments
Expand Down

0 comments on commit 61f8e10

Please sign in to comment.