sk0x50 commented on code in PR #6416:
URL: https://github.com/apache/ignite-3/pull/6416#discussion_r2281861167
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -402,7 +418,19 @@ private CompletableFuture<Void>
onUpdateFilterBusy(AlterZoneEventParameters para
private CompletableFuture<?> onCreateZone(CatalogZoneDescriptor zone, long
causalityToken) {
HybridTimestamp timestamp =
metaStorageManager.timestampByRevisionLocally(causalityToken);
- return dataNodesManager.onZoneCreate(zone.id(), timestamp,
filterDataNodes(logicalTopology(causalityToken), zone));
+ return dataNodesManager
+ .onZoneCreate(zone.id(), timestamp,
filterDataNodes(logicalTopology(causalityToken), zone))
+ .whenComplete((unused, err) -> {
+ if (err == null) {
+ try {
+ registerMetricSource(zone);
+ } catch (Exception e) {
+ // This is not a critical error, so there is no
need to stop node if we failed to register a metric source.
+ // So, just log the error.
+ LOG.error("Failed to register a new zone metric
source [zoneDescriptor={}]", e, zone);
+ }
+ }
Review Comment:
Thanks! I had the impression that the return value was being used by
someone, but that's not the case. Changed to `thenReturn`
--
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: notifications-unsubscr...@ignite.apache.org
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org