diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-26 16:40:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-26 16:40:36 +0000 |
commit | 9b7cc9c30b8333bdd2d06696ff27ce97fb130c9d (patch) | |
tree | a0d39ecdbb22c138abd6648eca3da382fbbb4f2f /storage/src/tests | |
parent | 22f126bc61fd6bb16871132f95ec5073f69cedff (diff) |
- Honour max merge chunk size in one place.
- GC incomplete enable_merge_local_node_choose_docs_optimalization handling.
Diffstat (limited to 'storage/src/tests')
3 files changed, 8 insertions, 10 deletions
diff --git a/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp b/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp index 58f6587e087..35aee60d30f 100644 --- a/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp +++ b/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp @@ -72,7 +72,7 @@ createGetDiff(const document::BucketId& bucket, std::shared_ptr<api::ApplyBucketDiffCommand> createApplyDiff(const document::BucketId& bucket, const std::vector<api::MergeBucketCommand::Node>& nodes) { - auto cmd = std::make_shared<api::ApplyBucketDiffCommand>(makeDocumentBucket(bucket), nodes, 1024*1024); + auto cmd = std::make_shared<api::ApplyBucketDiffCommand>(makeDocumentBucket(bucket), nodes); assignCommandMeta(*cmd); return cmd; } diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp index 8aacb6027e7..cda570a4396 100644 --- a/storage/src/tests/persistence/mergehandlertest.cpp +++ b/storage/src/tests/persistence/mergehandlertest.cpp @@ -285,7 +285,7 @@ MergeHandlerTest::testApplyBucketDiffChain(bool midChain) MergeHandler handler = createHandler(); LOG(debug, "Verifying that apply bucket diff is sent on"); - auto cmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes, _maxTimestamp); + auto cmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes); MessageTracker::UP tracker1 = handler.handleApplyBucketDiff(*cmd, createTracker(cmd, _bucket)); api::StorageMessage::SP replySent = std::move(*tracker1).stealReplySP(); @@ -510,7 +510,7 @@ TEST_F(MergeHandlerTest, chunk_limit_partially_filled_diff) { } setUpChain(MIDDLE); - auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes, maxChunkSize); + auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes); applyBucketDiffCmd->getDiff() = applyDiff; MergeHandler handler = createHandler(maxChunkSize); @@ -591,15 +591,14 @@ MergeHandlerTest::createDummyApplyDiff(int timestampOffset, fillDummyApplyDiff(applyDiff); } - auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes, 1024*1024); + auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes); applyBucketDiffCmd->getDiff() = applyDiff; return applyBucketDiffCmd; } // Must match up with diff used in createDummyApplyDiff std::shared_ptr<api::GetBucketDiffCommand> -MergeHandlerTest::createDummyGetBucketDiff(int timestampOffset, - uint16_t hasMask) +MergeHandlerTest::createDummyGetBucketDiff(int timestampOffset, uint16_t hasMask) { std::vector<api::GetBucketDiffCommand::Entry> diff; { @@ -726,7 +725,7 @@ TEST_F(MergeHandlerTest, entry_removed_after_get_bucket_diff) { applyDiff.push_back(e); } setUpChain(BACK); - auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes, 1024*1024); + auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes); applyBucketDiffCmd->getDiff() = applyDiff; auto tracker = handler.handleApplyBucketDiff(*applyBucketDiffCmd, createTracker(applyBucketDiffCmd, _bucket)); @@ -1148,7 +1147,7 @@ TEST_F(MergeHandlerTest, remove_put_on_existing_timestamp) { applyDiff.push_back(e); } - auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes, 1024*1024); + auto applyBucketDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(_bucket, _nodes); applyBucketDiffCmd->getDiff() = applyDiff; auto tracker = handler.handleApplyBucketDiff(*applyBucketDiffCmd, createTracker(applyBucketDiffCmd, _bucket)); diff --git a/storage/src/tests/storageserver/mergethrottlertest.cpp b/storage/src/tests/storageserver/mergethrottlertest.cpp index e6067fa561c..0271af85fef 100644 --- a/storage/src/tests/storageserver/mergethrottlertest.cpp +++ b/storage/src/tests/storageserver/mergethrottlertest.cpp @@ -1367,8 +1367,7 @@ TEST_F(MergeThrottlerTest, get_bucket_diff_command_not_in_active_set_is_rejected TEST_F(MergeThrottlerTest, apply_bucket_diff_command_not_in_active_set_is_rejected) { document::BucketId bucket(16, 1234); std::vector<api::GetBucketDiffCommand::Node> nodes; - auto applyDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>( - makeDocumentBucket(bucket), nodes, api::Timestamp(1234)); + auto applyDiffCmd = std::make_shared<api::ApplyBucketDiffCommand>(makeDocumentBucket(bucket), nodes); ASSERT_NO_FATAL_FAILURE(sendAndExpectReply(applyDiffCmd, api::MessageType::APPLYBUCKETDIFF_REPLY, |