xtern commented on code in PR #1880:
URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1171375901


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java:
##########
@@ -514,6 +510,10 @@ <T> CompletableFuture<T> doInSession(SessionAwareAction<T> 
action) {
 
         private SessionId recreateSession(@Nullable SessionId 
expectedSessionId) {
             synchronized (mux) {
+                if (closed) {
+                    throw new IgniteInternalException(CONNECTION_ERR, 
"Connection is closed");

Review Comment:
   I agree, but creating a good test for such a scenario seems not an easy task.
   Added something like a test called `sessionCreationAfterCloseRegistry` to 
cover this case.



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java:
##########
@@ -514,6 +510,10 @@ <T> CompletableFuture<T> doInSession(SessionAwareAction<T> 
action) {
 
         private SessionId recreateSession(@Nullable SessionId 
expectedSessionId) {
             synchronized (mux) {
+                if (closed) {
+                    throw new IgniteInternalException(CONNECTION_ERR, 
"Connection is closed");

Review Comment:
   I agree, but creating a good test for such a scenario seems not an easy task.
   Added something like a test called `sessionCreationAfterCloseRegistry`.



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