diff --git a/fdbserver/TagPartitionedLogSystem.actor.cpp b/fdbserver/TagPartitionedLogSystem.actor.cpp index 3ccef6192e..a4822a7ef5 100644 --- a/fdbserver/TagPartitionedLogSystem.actor.cpp +++ b/fdbserver/TagPartitionedLogSystem.actor.cpp @@ -1908,7 +1908,7 @@ Optional>> TagPartition int absent = logSet->logServers.size() - results.size(); int safe_range_begin = logSet->tLogWriteAntiQuorum; int new_safe_range_begin = std::min(logSet->tLogWriteAntiQuorum, (int)(results.size() - 1)); - int safe_range_end = logSet->tLogReplicationFactor - absent; + int safe_range_end = std::max(logSet->tLogReplicationFactor - absent, 1); if (!lastEnd.present() || ((safe_range_end > 0) && (safe_range_end - 1 < results.size()) && results[safe_range_end - 1].end < lastEnd.get())) {