mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix bad merge of D16791 and D16767
Summary: A bad Auto-Merge caused log buffer is flushed twice. Remove the unintended one. Test Plan: Should already be tested (the code looks the same as when I ran unit tests). Reviewers: haobo, igor Reviewed By: haobo CC: ljin, yhchiang, leveldb Differential Revision: https://reviews.facebook.net/D16821
This commit is contained in:
@@ -67,8 +67,21 @@ static void ReplicationThreadBody(void* arg) {
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "Refreshing iterator\n");
|
||||
for(;iter->Valid(); iter->Next(), t->no_read++, currentSeqNum++) {
|
||||
for (; !iter->IsObsolete(); iter->Next()) {
|
||||
if (!iter->Valid()) {
|
||||
if (t->stop.Acquire_Load() == nullptr) {
|
||||
return;
|
||||
}
|
||||
// need to wait for new rows.
|
||||
continue;
|
||||
}
|
||||
|
||||
BatchResult res = iter->GetBatch();
|
||||
if (!iter->status().ok()) {
|
||||
fprintf(stderr, "Corruption reported when reading seq no. b/w %ld",
|
||||
static_cast<uint64_t>(currentSeqNum));
|
||||
exit(1);
|
||||
}
|
||||
if (res.sequence != currentSeqNum) {
|
||||
fprintf(stderr,
|
||||
"Missed a seq no. b/w %ld and %ld\n",
|
||||
@@ -76,6 +89,8 @@ static void ReplicationThreadBody(void* arg) {
|
||||
(long)res.sequence);
|
||||
exit(1);
|
||||
}
|
||||
t->no_read++;
|
||||
currentSeqNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user