enh: keep extra raft Logs before minimum match index

This commit is contained in:
Benguang Zhao 2023-03-07 16:44:47 +08:00
parent 21c18a4a9b
commit eca97bf5b4
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ int32_t syncBeginSnapshot(int64_t rid, int64_t lastApplyIndex) {
syncNodeRelease(pSyncNode); syncNodeRelease(pSyncNode);
return 0; return 0;
} }
logRetention = TMAX(logRetention, lastApplyIndex - pSyncNode->minMatchIndex); logRetention = TMAX(logRetention, lastApplyIndex - pSyncNode->minMatchIndex + logRetention);
} }
_DEL_WAL: _DEL_WAL: