RaigorJiang opened a new issue, #38096: URL: https://github.com/apache/shardingsphere/issues/38096
## Bug Report ### Which version of ShardingSphere did you use? 5.5.3-SNAPSHOT master eb7d8ceb5915e1e754bfd282ce3789bbc582bdc1 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Reason analyze (If you can) `DatabaseRuleDefinitionExecutor` declares the SingletonSPI annotation, but it also implements `DistSQLExecutorDatabaseAware` and `DistSQLExecutorRuleAware` to set private variables, which poses a risk of pollution during multi-threaded concurrent execution. Risk Implications: - When two threads execute the same type of `DistSQL` concurrently, thread A might have just used `setDatabase/setRule`, but thread B could overwrite it. - Thread A's subsequent `checkBeforeUpdate/build...` calls might read thread B's `database/rule`. Similarly, `DistSQLQueryExecutor`, `DistSQLUpdateExecutor`, and `GlobalRuleDefinitionExecutor` also have the same risk. -- 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]
