dcapwell commented on code in PR #2066:
URL: https://github.com/apache/cassandra/pull/2066#discussion_r1065184027
##########
src/java/org/apache/cassandra/streaming/StreamingState.java:
##########
@@ -54,18 +57,14 @@ public class StreamingState implements StreamEventHandler
private final long createdAtMillis = Clock.Global.currentTimeMillis();
- // while streaming is running, this is a cache of StreamInfo seen with
progress state
- // the reason for the cache is that StreamSession drops data after tasks
(recieve/send) complete, this makes
- // it so that current state of a future tracks work pending rather than
work done, cache solves this by not deleting
- // when tasks complete
- // To lower memory costs, clear this after the stream completes
- private ConcurrentMap<InetSocketAddress, SessionInfo> streamProgress = new
ConcurrentHashMap<>();
-
private final TimeUUID id;
private final boolean follower;
private final StreamOperation operation;
- private Set<InetSocketAddress> peers = null;
- private Sessions sessions = Sessions.EMPTY;
+ private final Set<InetSocketAddress> peers = Collections.newSetFromMap(new
ConcurrentHashMap<>());
+ @GuardedBy("this")
+ private final ObjectLongMap<Pair<InetAddressAndPort, String>> activeFiles
= new ObjectLongHashMap<>();
+ @GuardedBy("this")
+ private final Sessions sessions = new Sessions();
Review Comment:
correct, shouldn't be able to deadlock doe to the reentrant nature
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]