@@ -217,8 +217,7 @@ class ReplicationTest : public testing::Test {
217
217
// it will catch up until end of log
218
218
//
219
219
// Returns the number of log records applied
220
- size_t catchUpFollower (std::optional<size_t > num_records = std::nullopt,
221
- bool allow_new_manifest_writes = true );
220
+ size_t catchUpFollower (std::optional<size_t > num_records = std::nullopt);
222
221
223
222
WriteOptions wo () const {
224
223
WriteOptions w;
@@ -429,11 +428,7 @@ DB* ReplicationTest::openLeader(Options options, uint64_t snapshot_replication_e
429
428
s = db->ApplyReplicationLogRecord (
430
429
log_records_[leaderSeq].first , log_records_[leaderSeq].second ,
431
430
[this ](Slice) { return ColumnFamilyOptions (leaderOptions ()); },
432
- true /* allow_new_manifest_writes */ ,
433
- snapshot_replication_epoch_,
434
- &info,
435
- DB::AR_EVICT_OBSOLETE_FILES |
436
- DB::AR_EPOCH_BASED_DIVERGENCE_DETECTION);
431
+ snapshot_replication_epoch_, &info, DB::AR_EVICT_OBSOLETE_FILES);
437
432
assert (s.ok ());
438
433
assert (!info.diverged_manifest_writes );
439
434
}
@@ -480,8 +475,7 @@ DB* ReplicationTest::openFollower(Options options) {
480
475
return db;
481
476
}
482
477
483
- size_t ReplicationTest::catchUpFollower (std::optional<size_t > num_records,
484
- bool allow_new_manifest_writes) {
478
+ size_t ReplicationTest::catchUpFollower (std::optional<size_t > num_records) {
485
479
MutexLock lock (&log_records_mutex_);
486
480
DB::ApplyReplicationLogRecordInfo info;
487
481
size_t ret = 0 ;
@@ -496,15 +490,11 @@ size_t ReplicationTest::catchUpFollower(std::optional<size_t> num_records,
496
490
[this ](Slice) {
497
491
return ColumnFamilyOptions (follower_db_->GetOptions ());
498
492
},
499
- allow_new_manifest_writes,
500
493
snapshot_replication_epoch_,
501
494
&info, flags);
502
495
assert (s.ok ());
503
496
++ret;
504
497
}
505
- if (info.has_new_manifest_writes ) {
506
- assert (info.has_manifest_writes );
507
- }
508
498
for (auto & cf : info.added_column_families ) {
509
499
auto inserted =
510
500
follower_cfs_.try_emplace (cf->GetName (), std::move (cf)).second ;
@@ -1112,20 +1102,6 @@ TEST_F(ReplicationTest, LogNumberDontGoBackwards) {
1112
1102
EXPECT_GE (logNum, minLogNumberToKeep);
1113
1103
}
1114
1104
1115
- TEST_F (ReplicationTest, AllowNewManifestWrite) {
1116
- auto leader = openLeader (), follower = openFollower ();
1117
-
1118
- ASSERT_OK (leader->Put (wo (), " k1" , " v1" ));
1119
- ASSERT_OK (leader->Flush ({}));
1120
- catchUpFollower (2 );
1121
- // The new manifest write won't be applied
1122
- catchUpFollower (1 , false );
1123
- uint64_t followerMUS, leaderMUS;
1124
- ASSERT_OK (follower->GetManifestUpdateSequence (&followerMUS));
1125
- ASSERT_OK (leader->GetManifestUpdateSequence (&leaderMUS));
1126
- EXPECT_LT (followerMUS, leaderMUS);
1127
- }
1128
-
1129
1105
// Memtable switch record won't be generated if all memtables are empty
1130
1106
TEST_F (ReplicationTest, NoMemSwitchRecordIfEmpty) {
1131
1107
auto leader = openLeader ();
0 commit comments