Skip to content

Commit

Permalink
Compact twice to workaround compact test issue before 8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Oct 11, 2023
1 parent 58aad23 commit 9983efd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/cppunit/compact_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ TEST(Compact, Filter) {
usleep(10000);
hash->Set(live_hash_key, "f1", "v1", &ret);
hash->Set(live_hash_key, "f2", "v2", &ret);
// Compact twice to workaround issue fixed by: https://github.com/facebook/rocksdb/pull/11468
// before rocksdb/speedb 8.1.1. This line can be removed after speedb upgraded above 8.1.1.
status = storage->Compact(nullptr, nullptr);
assert(status.ok());
auto status = storage->Compact(nullptr, nullptr);
assert(status.ok());
rocksdb::DB* db = storage->GetDB();
Expand Down Expand Up @@ -78,9 +82,9 @@ TEST(Compact, Filter) {
st = zset->Expire(expired_zset_key, 1); // expired
usleep(10000);

// Same as the above compact, need to compact twice here
status = storage->Compact(nullptr, nullptr);
// Compact twice to workaround issue fixed by: https://github.com/facebook/rocksdb/pull/11468
// before rocksdb/speedb 8.1.1. This line can be removed after speedb upgraded above 8.1.1.
assert(status.ok());
status = storage->Compact(nullptr, nullptr);
assert(status.ok());

Expand Down

0 comments on commit 9983efd

Please sign in to comment.