ololo3000 commented on a change in pull request #9357:
URL: https://github.com/apache/ignite/pull/9357#discussion_r698585259



##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/isolated/IsolatedNode.java
##########
@@ -150,4 +150,9 @@ public IsolatedNode(UUID id, Map<String, Object> attrs, 
IgniteProductVersion ver
     @Override public void setCacheMetrics(Map<Integer, CacheMetrics> 
cacheMetrics) {
         this.cacheMetrics = cacheMetrics != null ? cacheMetrics : 
Collections.emptyMap();
     }
+
+    /** */
+    public void setAttributes(Map<String, Object> attrs) {
+        this.attrs = U.sealMap(attrs);

Review comment:
       To avoid attributes change after node start outside DiscoverySpi. As 
mentioned in org.apache.ignite.cluster.ClusterNode#attributes.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/isolated/IsolatedNode.java
##########
@@ -150,4 +150,9 @@ public IsolatedNode(UUID id, Map<String, Object> attrs, 
IgniteProductVersion ver
     @Override public void setCacheMetrics(Map<Integer, CacheMetrics> 
cacheMetrics) {
         this.cacheMetrics = cacheMetrics != null ? cacheMetrics : 
Collections.emptyMap();
     }
+
+    /** */
+    public void setAttributes(Map<String, Object> attrs) {
+        this.attrs = U.sealMap(attrs);

Review comment:
       To avoid attributes change after node start outside DiscoverySpi. As 
mentioned in org.apache.ignite.cluster.ClusterNode#attributes javadoc.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/isolated/IsolatedDiscoverySpi.java
##########
@@ -189,6 +206,23 @@
 
     /** {@inheritDoc} */
     @Override public void spiStart(@Nullable String igniteInstanceName) throws 
IgniteSpiException {
+        if (auth != null) {
+            Map<String, Object> nodeAttrs = new 
HashMap<>(locNode.attributes());

Review comment:
       Done.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/isolated/IsolatedNode.java
##########
@@ -150,4 +150,9 @@ public IsolatedNode(UUID id, Map<String, Object> attrs, 
IgniteProductVersion ver
     @Override public void setCacheMetrics(Map<Integer, CacheMetrics> 
cacheMetrics) {
         this.cacheMetrics = cacheMetrics != null ? cacheMetrics : 
Collections.emptyMap();
     }
+
+    /** */
+    public void setAttributes(Map<String, Object> attrs) {
+        this.attrs = U.sealMap(attrs);

Review comment:
       To avoid attributes change after node start outside DiscoverySpi. As 
mentioned in `org.apache.ignite.cluster.ClusterNode#attributes` javadoc.




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