Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Sep 2, 2024
1 parent 8f1d804 commit 18569c8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public void pinTimestamp(long timestamp, String pinningEntity, ActionListener<Vo
elapsedTime,
RemoteStoreSettings.getPinnedTimestampsLookbackInterval().nanos()
);
logger.error(errorMessage);
unpinTimestamp(timestamp, pinningEntity, ActionListener.wrap(() -> listener.onFailure(new RuntimeException(errorMessage))));
} else {
listener.onResponse(null);
Expand Down Expand Up @@ -165,6 +166,7 @@ public void cloneTimestamp(long timestamp, String existingPinningEntity, String
timestamp,
existingPinningEntity
);
logger.error(errorMessage);
listener.onFailure(new IllegalArgumentException(errorMessage));
}
} catch (IOException e) {
Expand Down Expand Up @@ -205,6 +207,7 @@ public void unpinTimestamp(long timestamp, String pinningEntity, ActionListener<
listener.onResponse(null);
} else {
String errorMessage = String.format(Locale.ROOT, "Timestamp: %s is not pinned by entity: %s", timestamp, pinningEntity);
logger.error(errorMessage);
listener.onFailure(new IllegalArgumentException(errorMessage));
}
} catch (IOException e) {
Expand Down

0 comments on commit 18569c8

Please sign in to comment.