Skip to content

Commit 6a383c5

Browse files
Mike WiederholdMichael Wiederhold
authored andcommitted
Remove assertions that assert a completed op isn't timed out
Matt was trying to assure we weren't erroneously marking something timedout that had been completed. The timeout can come from either the IO thread or the latch from the asynch call. Now that we have synchronized methods this shouldn't happen. Change-Id: I4b7e02f839074f80909d4f0fb44b707b76a1a5d5 Reviewed-on: http://review.couchbase.org/9436 Reviewed-by: Matt Ingenthron <[email protected]> Tested-by: Michael Wiederhold <[email protected]>
1 parent a77c9fd commit 6a383c5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ public void setHandlingNode(MemcachedNode to) {
157157

158158
@Override
159159
public synchronized void timeOut() {
160-
assert (state != OperationState.READING || state != OperationState.COMPLETE);
161160
timedout = true;
162161
callback.complete();
163162
}
@@ -172,7 +171,6 @@ public synchronized boolean isTimedOut(long ttlMillis) {
172171
long elapsed = System.nanoTime();
173172
long ttlNanos = ttlMillis * 1000 * 1000;
174173
if (elapsed - creationTime > ttlNanos) {
175-
assert (state != OperationState.READING || state != OperationState.COMPLETE);
176174
timedOutUnsent = true;
177175
timedout = true;
178176
callback.complete();

0 commit comments

Comments
 (0)