jianliu commented on a change in pull request #11587:
URL: https://github.com/apache/shardingsphere/pull/11587#discussion_r682242907



##########
File path: 
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnection.java
##########
@@ -81,7 +82,7 @@
     
     private final Collection<DatabaseCommunicationEngine> 
inUseDatabaseCommunicationEngines = Collections.newSetFromMap(new 
ConcurrentHashMap<>(64));
     
-    private final Collection<ConnectionPostProcessor> connectionPostProcessors 
= new LinkedList<>();
+    private final Collection<ConnectionPostProcessor> connectionPostProcessors 
= new CopyOnWriteArrayList<>();

Review comment:
       As you said, processors are indeed only operated in one thread at a 
time, but not promise in the same thread. The changes of thread1 may not be 
visible to thread2, which is why we use volatile.I`ll test it
   




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