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 authored Aug 18, 2023
1 parent f9584b8 commit a6719dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1765,9 +1765,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 a6719dc

Please sign in to comment.