From c1b9b968041b12d91428d3544a06762f5b1dccda Mon Sep 17 00:00:00 2001 From: brido4125 Date: Fri, 4 Aug 2023 16:18:37 +0900 Subject: [PATCH] INTERNAL: Remove volatile keyword and change cause format. --- .../java/net/spy/memcached/protocol/BaseOperationImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java b/src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java index d8ccba66c..6857ad344 100644 --- a/src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java @@ -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); @@ -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;