Skip to content

Commit a5c98f7

Browse files
committed
Update code comment for synchronization of cluster configuration updates.
1 parent f350335 commit a5c98f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/net/spy/memcached/MemcachedConnection.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,11 @@ public class MemcachedConnection extends SpyThread implements ClusterConfigurati
253253
//objects across threads which is more risk prone for concurrency issues.
254254
protected final ReentrantLock lockForNodeUpdates;
255255

256-
//Lock for managing condition variable for poller thread to wait for successful update
257-
//of node list to the locator object.
256+
// Lock for managing synchronization conditions for poller thread and the constructor thread to wait for
257+
// successful update of node list to the locator object after retrieving the new cluster configuration.
258+
// The client constructor thread waits for connection thread to update the node list if needed during initialization.
259+
// The configuration poller thread runs every minutes, so it waits for up to 50 seconds for the
260+
// connection thread to update the node list with the new configuration at run-time.
258261
protected final ReentrantLock conditionLock;
259262
protected final Condition nodeUpdateCondition;
260263
protected boolean isInitialClusterConfigApplied;

0 commit comments

Comments
 (0)