-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resilience: fix bug in formatting and handling of cache exception types
Motivation: The utility which returns a CacheException object with an appropriate message and type based on the failure type and operation uses string formatting to process arguments. The way the code is written, however, is subject to bad formatting exceptions, particularly if there are unexpected null values passed in as parameters (for instance, if an exception cause is null). In some of these cases, the actual exception is masked because of the formatting exception, causing the removal of the operation from the map to fail. Modification: Change the method such that it accounts for nulls; this also requires respecting the contract that the format strings used will always have three % placeholders. In addition to this, the "Will retry" message appended to the failure message should not be included if the error is fatal. Result: Correct formatting will not block proper removal from the operation map and potentially freeze progress in the resilience service as a whole. Target: master Request: 3.2 Request: 3.1 Request: 3.0 Request: 2.16 Require-notes: yes Require-book: no Acked-by: Tigran
- Loading branch information
Showing
3 changed files
with
35 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters