Skip to content

Commit

Permalink
RATIS-1873. Remove RetryCache assertion that doesn't hold (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
SzyWilliam committed Aug 28, 2023
1 parent 31d281d commit 209bbe2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1730,9 +1730,9 @@ private CompletableFuture<Message> replyPendingRequest(
final ClientInvocationId invocationId = ClientInvocationId.valueOf(logEntry.getStateMachineLogEntry());
// update the retry cache
final CacheEntry cacheEntry = retryCache.getOrCreateEntry(invocationId);
if (getInfo().isLeader()) {
Preconditions.assertTrue(cacheEntry != null && !cacheEntry.isCompletedNormally(),
"retry cache entry should be pending: %s", cacheEntry);
Preconditions.assertTrue(cacheEntry != null);
if (getInfo().isLeader() && !cacheEntry.isCompletedNormally()) {
LOG.warn("{} retry cache entry of leader should be pending: {}", this, cacheEntry);
}
if (cacheEntry.isFailed()) {
retryCache.refreshEntry(new CacheEntry(cacheEntry.getKey()));
Expand Down

0 comments on commit 209bbe2

Please sign in to comment.