Skip to content

Commit

Permalink
Retry drop on Interrupted server error (mongodb#1331)
Browse files Browse the repository at this point in the history
JAVA-5352
  • Loading branch information
jyemin committed Mar 13, 2024
1 parent 016b48e commit 36ef5cd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ public static void drop(final MongoNamespace namespace, final WriteConcern write
} catch (MongoWriteConcernException e) {
LOGGER.info("Retrying drop collection after a write concern error: " + e);
// repeat until success!
} catch (MongoCommandException e) {
if ("Interrupted".equals(e.getErrorCodeName())) {
LOGGER.info("Retrying drop collection after an Interrupted error: " + e);
// repeat until success!
} else {
throw e;
}
}
}
}
Expand Down

0 comments on commit 36ef5cd

Please sign in to comment.