ptupitsyn commented on code in PR #7031:
URL: https://github.com/apache/ignite-3/pull/7031#discussion_r2584932167
##########
modules/client/src/main/java/org/apache/ignite/internal/client/ReliableChannel.java:
##########
@@ -773,7 +800,14 @@ private void onObservableTimestampReceived(long newTs) {
}
private void onPartitionAssignmentChanged(long timestamp) {
- partitionAssignmentTimestamp.updateAndGet(curTs -> Math.max(curTs,
timestamp));
+ var old = partitionAssignmentTimestamp.getAndUpdate(curTs ->
Math.max(curTs, timestamp));
+
+ if (timestamp > old) {
+ // New assignment timestamp, topology change possible.
+ if (scheduledChannelsReinit.compareAndSet(false, true)) {
+ initChannelHolders();
Review Comment:
We are on a Netty thread here and we should not do any heavy lifting to
avoid blocking the IO event loop.
We can either raise some flag to refresh later, on use a separate executor.
--
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]