Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/com/scalar/db/common/CoreError.java
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ public enum CoreError implements ScalarDbError {
"Committing state failed with NoMutationException, but the coordinator status does not exist. Details: %s",
"",
""),
CONSENSUS_COMMIT_CANNOT_COORDINATOR_STATUS(
CONSENSUS_COMMIT_CANNOT_GET_COORDINATOR_STATUS(
Category.UNKNOWN_TRANSACTION_STATUS_ERROR,
"0002",
"The coordinator status cannot be retrieved. Details: %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ public class NoMutationException extends ExecutionException {

public NoMutationException(
String message, @SuppressFBWarnings("EI_EXPOSE_REP2") List<? extends Mutation> mutations) {
super(addTransactionIdToMessage(message, mutations));
super(addMutationDetailsToMessage(message, mutations));
this.mutations = mutations;
}

public NoMutationException(
String message,
@SuppressFBWarnings("EI_EXPOSE_REP2") List<? extends Mutation> mutations,
Throwable cause) {
super(addTransactionIdToMessage(message, mutations), cause);
super(addMutationDetailsToMessage(message, mutations), cause);
this.mutations = mutations;
}

public List<? extends Mutation> getMutations() {
return ImmutableList.copyOf(mutations);
}

private static String addTransactionIdToMessage(
private static String addMutationDetailsToMessage(
String message, List<? extends Mutation> mutations) {
StringBuilder builder = new StringBuilder(message).append(". Mutations: [");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ protected void handleCommitConflict(Snapshot snapshot, Exception cause)
}
} catch (CoordinatorException ex) {
throw new UnknownTransactionStatusException(
CoreError.CONSENSUS_COMMIT_CANNOT_COORDINATOR_STATUS.buildMessage(ex.getMessage()),
CoreError.CONSENSUS_COMMIT_CANNOT_GET_COORDINATOR_STATUS.buildMessage(ex.getMessage()),
ex,
snapshot.getId());
}
Expand Down Expand Up @@ -397,7 +397,7 @@ public TransactionState abortState(String id) throws UnknownTransactionStatusExc
id);
} catch (CoordinatorException e1) {
throw new UnknownTransactionStatusException(
CoreError.CONSENSUS_COMMIT_CANNOT_COORDINATOR_STATUS.buildMessage(e1.getMessage()),
CoreError.CONSENSUS_COMMIT_CANNOT_GET_COORDINATOR_STATUS.buildMessage(e1.getMessage()),
e1,
id);
}
Expand Down