Adding logging for DynamoDB ProvisionedThroughputExceededExcpetion (#212)

* Adding logging to ProvisionedThroughputExceededException.

* Addressing CR comments and changing log level from error to warn

* Updated the comments as per cr comments.
This commit is contained in:
Sahil Palvia 2017-09-15 11:04:30 -07:00 committed by GitHub
parent 1ec0b656c9
commit 656b17ceaa

View file

@ -564,6 +564,7 @@ public class LeaseManager<T extends Lease> implements ILeaseManager<T> {
protected DependencyException convertAndRethrowExceptions(String operation, String leaseKey, AmazonClientException e)
throws ProvisionedThroughputException, InvalidStateException {
if (e instanceof ProvisionedThroughputExceededException) {
LOG.warn("Provisioned Throughput on the lease table has been exceeded. It's recommended that you increase the IOPs on the table. Failure to increase the IOPs may cause the application to not make progress.");
throw new ProvisionedThroughputException(e);
} else if (e instanceof ResourceNotFoundException) {
// @formatter:on