alex-plekhanov commented on code in PR #12887:
URL: https://github.com/apache/ignite/pull/12887#discussion_r2986714898
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java:
##########
@@ -1163,6 +1160,52 @@ private int[] copy(int[] arr) {
return Arrays.copyOf(arr, arr.length);
}
+ /** {@inheritDoc} */
+ @Override public DiscoveryDataExchangeType discoveryDataType() {
+ return DiscoveryDataExchangeType.EVENT_MGR;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data) {
+ if (data.commonData() == null)
+ return;
+
+ if (ctx.clientNode())
+ return;
+
+ GridIntList clusterData = new GridIntList((int[])data.commonData());
+ GridIntList nodeData = new GridIntList(enabledEvents());
+
+ GridIntList toEnable = new GridIntList(clusterData.size());
+ GridIntList toDisable = new GridIntList(nodeData.size());
+
+ for (int i = 0; i < clusterData.size(); i++) {
+ if (!nodeData.contains(clusterData.get(i)))
+ toEnable.add(clusterData.get(i));
+ }
+
+ for (int i = 0; i < nodeData.size(); i++) {
+ if (!clusterData.contains(nodeData.get(i)))
+ toDisable.add(nodeData.get(i));
+ }
+
+ if (!toEnable.isEmpty())
+ enableEvents(toEnable.arrayCopy());
Review Comment:
Fixed
--
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]