You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ib...@apache.org on 2021/05/21 15:03:20 UTC

[ignite-3] branch main updated: IGNITE-14756 Fixed data race in configuration update (#142)

This is an automated email from the ASF dual-hosted git repository.

ibessonov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 1d8ea0e  IGNITE-14756 Fixed data race in configuration update (#142)
1d8ea0e is described below

commit 1d8ea0eff582cb1bce3a3040b7de1add9f06c5ab
Author: Mirza Aliev <al...@gmail.com>
AuthorDate: Fri May 21 18:03:13 2021 +0300

    IGNITE-14756 Fixed data race in configuration update (#142)
---
 .../apache/ignite/configuration/internal/ConfigurationNode.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/configuration/src/main/java/org/apache/ignite/configuration/internal/ConfigurationNode.java b/modules/configuration/src/main/java/org/apache/ignite/configuration/internal/ConfigurationNode.java
index 328ca10..96fbb16 100644
--- a/modules/configuration/src/main/java/org/apache/ignite/configuration/internal/ConfigurationNode.java
+++ b/modules/configuration/src/main/java/org/apache/ignite/configuration/internal/ConfigurationNode.java
@@ -111,11 +111,13 @@ abstract class ConfigurationNode<VIEW, CHANGE> implements ConfigurationProperty<
 
             synchronized (this) {
                 if (cachedRootNode == oldRootNode) {
-                    cachedRootNode = newRootNode;
-
                     beforeRefreshValue(newVal);
 
-                    return val = newVal;
+                    val = newVal;
+
+                    cachedRootNode = newRootNode;
+
+                    return newVal;
                 }
                 else {
                     if (invalid)