Skip to content

Commit

Permalink
INTERNAL: Remove volatile keyword and change cause format.
Browse files Browse the repository at this point in the history
  • Loading branch information
brido4125 authored and jhpark816 committed Aug 4, 2023
1 parent e487e3e commit c1b9b96
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public abstract class BaseOperationImpl extends SpyObject {
*/
public static final OperationStatus CANCELLED =
new CancelledOperationStatus();
private volatile OperationState state = OperationState.WRITE_QUEUED;
private OperationState state = OperationState.WRITE_QUEUED;
private ByteBuffer cmd = null;
private boolean cancelled = false;
private final AtomicBoolean callbacked = new AtomicBoolean(false);
Expand Down Expand Up @@ -96,10 +96,9 @@ public final boolean cancel(String cause) {
if (callbacked.compareAndSet(false, true)) {
cancelled = true;
if (handlingNode != null) {
cancelCause = "Cancelled (" + cause + " : (" + handlingNode.getNodeName() + ")" + ")";
} else {
cancelCause = "Cancelled (" + cause + ")";
cause += " @ " + handlingNode.getNodeName();
}
cancelCause = "Cancelled (" + cause + ")";
wasCancelled();
callback.complete();
return true;
Expand Down

0 comments on commit c1b9b96

Please sign in to comment.