Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0.x] ISPN-13605 SIFS write/delete/containsKey(...) exception handling does not conform to NonBlockingStore contract. #9774

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ?
try {
return logAppender.storeRequest(segment, entry);
} catch (Exception e) {
throw new PersistenceException(e);
return CompletableFutures.completedExceptionFuture(new PersistenceException(e));
}
}

Expand All @@ -531,7 +531,7 @@ public CompletionStage<Boolean> delete(int segment, Object key) {
try {
return logAppender.deleteRequest(segment, key, toBuffer(marshaller.objectToByteBuffer(key)));
} catch (Exception e) {
throw new PersistenceException(e);
return CompletableFutures.completedExceptionFuture(new PersistenceException(e));
}
}

Expand Down Expand Up @@ -569,7 +569,7 @@ public CompletionStage<Boolean> containsKey(int segment, Object key) {
}
}
} catch (Exception e) {
throw log.cannotLoadKeyFromIndex(key, e);
return CompletableFutures.completedExceptionFuture(log.cannotLoadKeyFromIndex(key, e));
}
}

Expand Down