feat(server): Implement PFMERGE (#1180)

* feat(server): Implement PFMERGE.

* Disable lock check on failing tests.
This commit is contained in:
Chaka 2023-05-04 15:12:48 +03:00 committed by GitHub
parent cb82680aca
commit a2f68d1b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 221 additions and 42 deletions

View file

@ -156,7 +156,25 @@ void BaseFamilyTest::SetUp() {
LOG(INFO) << "Starting " << test_info->name();
}
void BaseFamilyTest::DisableLockCheck() {
check_locks_ = false;
}
unsigned BaseFamilyTest::NumLocked() {
atomic_uint count = 0;
shard_set->RunBriefInParallel([&](EngineShard* shard) {
for (const auto& db : shard->db_slice().databases()) {
count += db->trans_locks.size();
}
});
return count;
}
void BaseFamilyTest::TearDown() {
if (check_locks_) {
CHECK_EQ(NumLocked(), 0U);
}
service_->Shutdown();
service_.reset();
pp_->Stop();