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

menghaoran pushed a commit to branch 5.1.0-release
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/5.1.0-release by this push:
     new 24c58eb  Compat update event when storage disable node changed. 
(#14477)
24c58eb is described below

commit 24c58ebcc5e6b96ce4deb46fcd3432aff74c6d6a
Author: zhaojinchao <[email protected]>
AuthorDate: Sun Jan 2 15:03:29 2022 +0800

    Compat update event when storage disable node changed. (#14477)
---
 .../registry/status/storage/watcher/StorageNodeStateChangedWatcher.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/StorageNodeStateChangedWatcher.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/StorageNodeStateChan
 [...]
index 1eb9c8a..96c3185 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/StorageNodeStateChangedWatcher.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/StorageNodeStateChangedWatcher.java
@@ -53,6 +53,6 @@ public final class StorageNodeStateChangedWatcher implements 
GovernanceWatcher<G
         if (primaryStateChangedEvent.isPresent()) {
             return primaryStateChangedEvent;
         }
-        return 
StorageStatusNode.extractQualifiedSchema(StorageNodeStatus.DISABLE, 
event.getKey()).map(schema -> new DisabledStateChangedEvent(schema, Type.ADDED 
== event.getType()));
+        return 
StorageStatusNode.extractQualifiedSchema(StorageNodeStatus.DISABLE, 
event.getKey()).map(schema -> new DisabledStateChangedEvent(schema, 
Type.DELETED != event.getType()));
     }
 }

Reply via email to