SammyVimes commented on code in PR #1016:
URL: https://github.com/apache/ignite-3/pull/1016#discussion_r957380076


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1562,6 +1697,40 @@ public void onError(@NotNull Throwable e) {
                 LOG.warn("Unable to process stable assignments event", e);
             }
         });
+
+        
metaStorageMgr.registerWatchByPrefix(ByteArray.fromString(ASSIGNMENTS_SWITCH_REDUCE_PREFIX),
 new WatchListener() {
+            @Override
+            public boolean onUpdate(@NotNull WatchEvent evt) {
+                ByteArray key = evt.entryEvent().newEntry().key();
+
+                int partitionNumber = extractPartitionNumber(key);
+                UUID tblId = extractTableId(key, 
ASSIGNMENTS_SWITCH_REDUCE_PREFIX);
+                String partitionId = partitionRaftGroupName(tblId, 
partitionNumber);
+
+                TableImpl tbl = tablesByIdVv.latest().get(tblId);
+                ExtendedTableConfiguration tblCfg = 
(ExtendedTableConfiguration) tablesCfg.tables().get(tbl.name());

Review Comment:
   You're right. I usually relies on IDEA to tell me that cast is redundant :( 



-- 
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]

Reply via email to