@VisibleForTesting public static boolean handleCommitError(String message, Throwable t) { JVMStabilityInspector.inspectCommitLogThrowable(t); switch (DatabaseDescriptor.getCommitFailurePolicy()) { // Needed here for unit tests to not fail on default assertion case die: case stop: StorageService.instance.stopTransports(); //$FALL-THROUGH$ case stop_commit: logger.error(String.format("%s. Commit disk failure policy is %s; terminating thread", message, DatabaseDescriptor.getCommitFailurePolicy()), t); return false; case ignore: logger.error(message, t); return true; default: throw new AssertionError(DatabaseDescriptor.getCommitFailurePolicy()); } }
@VisibleForTesting public static boolean handleCommitError(String message, Throwable t) { JVMStabilityInspector.inspectCommitLogThrowable(t); switch (DatabaseDescriptor.getCommitFailurePolicy()) { // Needed here for unit tests to not fail on default assertion case die: case stop: StorageService.instance.stopTransports(); //$FALL-THROUGH$ case stop_commit: logger.error(String.format("%s. Commit disk failure policy is %s; terminating thread", message, DatabaseDescriptor.getCommitFailurePolicy()), t); return false; case ignore: logger.error(message, t); return true; default: throw new AssertionError(DatabaseDescriptor.getCommitFailurePolicy()); } }
@VisibleForTesting public static boolean handleCommitError(String message, Throwable t) { JVMStabilityInspector.inspectCommitLogThrowable(t); switch (DatabaseDescriptor.getCommitFailurePolicy()) { // Needed here for unit tests to not fail on default assertion case die: case stop: StorageService.instance.stopTransports(); //$FALL-THROUGH$ case stop_commit: logger.error(String.format("%s. Commit disk failure policy is %s; terminating thread", message, DatabaseDescriptor.getCommitFailurePolicy()), t); return false; case ignore: logger.error(message, t); return true; default: throw new AssertionError(DatabaseDescriptor.getCommitFailurePolicy()); } }
@VisibleForTesting public static boolean handleCommitError(String message, Throwable t) { JVMStabilityInspector.inspectCommitLogThrowable(t); switch (DatabaseDescriptor.getCommitFailurePolicy()) { // Needed here for unit tests to not fail on default assertion case die: case stop: StorageService.instance.stopTransports(); case stop_commit: logger.error(String.format("%s. Commit disk failure policy is %s; terminating thread", message, DatabaseDescriptor.getCommitFailurePolicy()), t); return false; case ignore: logger.error(message, t); return true; default: throw new AssertionError(DatabaseDescriptor.getCommitFailurePolicy()); } }