mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-01 02:37:02 +08:00
Ignore mutation logs of size 0 in converter
This commit is contained in:
parent
d0a24dd20d
commit
ca1a4ef9fd
@ -68,7 +68,7 @@ void printLogFiles(std::string msg, const std::vector<LogFile>& files) {
|
|||||||
std::vector<LogFile> getRelevantLogFiles(const std::vector<LogFile>& files, Version begin, Version end) {
|
std::vector<LogFile> getRelevantLogFiles(const std::vector<LogFile>& files, Version begin, Version end) {
|
||||||
std::vector<LogFile> filtered;
|
std::vector<LogFile> filtered;
|
||||||
for (const auto& file : files) {
|
for (const auto& file : files) {
|
||||||
if (file.beginVersion <= end && file.endVersion >= begin && file.tagId >= 0) {
|
if (file.beginVersion <= end && file.endVersion >= begin && file.tagId >= 0 && file.fileSize > 0) {
|
||||||
filtered.push_back(file);
|
filtered.push_back(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ std::vector<LogFile> getRelevantLogFiles(const std::vector<LogFile>& files, Vers
|
|||||||
|
|
||||||
// Remove duplicates. This is because backup workers may store the log for
|
// Remove duplicates. This is because backup workers may store the log for
|
||||||
// old epochs successfully, but do not update the progress before another
|
// old epochs successfully, but do not update the progress before another
|
||||||
// recovery happened. As a result, next epoch will retry and creates
|
// recovery happened. As a result, next epoch will retry and creates
|
||||||
// duplicated log files.
|
// duplicated log files.
|
||||||
std::vector<LogFile> sorted;
|
std::vector<LogFile> sorted;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user