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

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a9f1312677 Remove useless 
GlobalRuleDefinitionExecutor#checkBeforeUpdate (#40057)
5a9f1312677 is described below

commit 5a9f1312677cbd9c87d1c0da0d34324b5fdf1ba1
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Oct 5 15:14:23 2026 +0800

    Remove useless GlobalRuleDefinitionExecutor#checkBeforeUpdate (#40057)
---
 .../update/rule/global/GlobalRuleDefinitionExecuteEngine.java     | 1 -
 .../spi/update/rule/global/GlobalRuleDefinitionExecutor.java      | 8 --------
 .../handler/engine/update/DistSQLUpdateExecuteEngineTest.java     | 1 -
 3 files changed, 10 deletions(-)

diff --git 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rule/global/GlobalRuleDefinitionExecuteEngine.java
 
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rule/global/GlobalRuleDefinitionExecuteEngine.java
index 58d2e2988ce..86c71424e0e 100644
--- 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rule/global/GlobalRuleDefinitionExecuteEngine.java
+++ 
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rule/global/GlobalRuleDefinitionExecuteEngine.java
@@ -40,7 +40,6 @@ public final class GlobalRuleDefinitionExecuteEngine {
      */
     @SuppressWarnings("unchecked")
     public void executeUpdate() {
-        executor.checkBeforeUpdate(sqlStatement);
         
contextManager.getPersistServiceFacade().getModeFacade().getMetaDataManagerService().alterGlobalRuleConfiguration(executor.buildToBeAlteredRuleConfiguration(sqlStatement));
     }
 }
diff --git 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/spi/update/rule/global/GlobalRuleDefinitionExecutor.java
 
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/spi/update/rule/global/GlobalRuleDefinitionExecutor.java
index 1e0a8641d76..892f8a9d522 100644
--- 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/spi/update/rule/global/GlobalRuleDefinitionExecutor.java
+++ 
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/spi/update/rule/global/GlobalRuleDefinitionExecutor.java
@@ -31,14 +31,6 @@ import 
org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;
  */
 public interface GlobalRuleDefinitionExecutor<T extends 
GlobalRuleDefinitionStatement, R extends ShardingSphereRule> extends 
DistSQLExecutorRuleAware<R>, TypedSPI {
     
-    /**
-     * Check before update.
-     *
-     * @param sqlStatement SQL statement
-     */
-    default void checkBeforeUpdate(final T sqlStatement) {
-    }
-    
     /**
      * Build to be altered rule configuration.
      *
diff --git 
a/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/engine/update/DistSQLUpdateExecuteEngineTest.java
 
b/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/engine/update/DistSQLUpdateExecuteEngineTest.java
index d6d5aa7b26a..9c663585834 100644
--- 
a/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/engine/update/DistSQLUpdateExecuteEngineTest.java
+++ 
b/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/engine/update/DistSQLUpdateExecuteEngineTest.java
@@ -89,7 +89,6 @@ class DistSQLUpdateExecuteEngineTest {
             
when(executor.buildToBeAlteredRuleConfiguration(sqlStatement)).thenReturn(ruleConfig);
             new DistSQLUpdateExecuteEngine(sqlStatement, null, contextManager, 
null).executeUpdate();
         }
-        verify(executor).checkBeforeUpdate(sqlStatement);
         
verify(metaDataManagerPersistService).alterGlobalRuleConfiguration(ruleConfig);
     }
     

Reply via email to