Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(bulk_load): support clear last bulk load state rpc #1103

Merged
merged 5 commits into from
May 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: mutation_log_test failed when compile with debug type (#933)
  • Loading branch information
foreverneverer authored and hycdong committed Oct 25, 2021
commit 289eb4609ae781e3bcc6bbc6bfeae64dfd8fa785
13 changes: 5 additions & 8 deletions src/replica/test/mutation_log_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ namespace replication {
class mutation_log_test : public replica_test_base
{
public:
gpid _gpid;

public:
mutation_log_test() : _gpid(_replica->get_gpid()) {}
mutation_log_test() {}

void SetUp() override
{
Expand Down Expand Up @@ -503,7 +500,7 @@ TEST_F(mutation_log_test, reset_from)
std::vector<mutation_ptr> expected;
{ // writing logs
mutation_log_ptr mlog =
new mutation_log_private(_log_dir, 4, _gpid, _replica.get(), 1024, 512, 10000);
new mutation_log_private(_log_dir, 4, get_gpid(), _replica.get(), 1024, 512, 10000);

EXPECT_EQ(mlog->open(nullptr, nullptr), ERR_OK);

Expand All @@ -522,7 +519,7 @@ TEST_F(mutation_log_test, reset_from)

// create another set of logs
mutation_log_ptr mlog =
new mutation_log_private(_log_dir, 4, _gpid, _replica.get(), 1024, 512, 10000);
new mutation_log_private(_log_dir, 4, get_gpid(), _replica.get(), 1024, 512, 10000);
EXPECT_EQ(mlog->open(nullptr, nullptr), ERR_OK);
for (int i = 0; i < 1000; i++) {
mutation_ptr mu = create_test_mutation(2000 + i, "hello!");
Expand Down Expand Up @@ -553,7 +550,7 @@ TEST_F(mutation_log_test, reset_from_while_writing)
std::vector<mutation_ptr> expected;
{ // writing logs
mutation_log_ptr mlog =
new mutation_log_private(_log_dir, 4, _gpid, _replica.get(), 1024, 512, 10000);
new mutation_log_private(_log_dir, 4, get_gpid(), _replica.get(), 1024, 512, 10000);
EXPECT_EQ(mlog->open(nullptr, nullptr), ERR_OK);

for (int i = 0; i < 10; i++) {
Expand All @@ -568,7 +565,7 @@ TEST_F(mutation_log_test, reset_from_while_writing)

// create another set of logs
mutation_log_ptr mlog =
new mutation_log_private(_log_dir, 4, _gpid, _replica.get(), 1024, 512, 10000);
new mutation_log_private(_log_dir, 4, get_gpid(), _replica.get(), 1024, 512, 10000);
EXPECT_EQ(mlog->open(nullptr, nullptr), ERR_OK);

// given with a large number of mutation to ensure
Expand Down