Caideyipi opened a new pull request, #19292:
URL: https://github.com/apache/iotdb/pull/19292

   Backports the shared tree-model `SessionPool` fixes from #19288 
(8b7cf270f7e47eec568afe412a7c366a46903502) to `dev/1.3`.
   
   For example, exhausting result set A returns its session to the pool. If 
query B reuses that session, calling `A.close()` again previously removed B's 
occupied entry and returned its connection while B was still using it. The 
wrapper now detaches its session before reuse, so repeated or concurrent closes 
release it only once.
   
   Failed result-set cleanup now closes the broken physical session before 
creating a replacement. Operations returning after pool shutdown close their 
connections, and failures after shutdown do not create replacements.
   
   Compatibility adaptations:
   
   - The table-session wrapper and its lifecycle changes do not apply because 
this branch has no table-model sessions.
   - The existing close-and-replace calls are inlined because 1.3 lacks the 
one-argument cleanup helper.
   - The existing session factory is package-private to support the branch's 
Mockito 2 tests; its construction logic is unchanged. `putBack` remains private.
   - Shared result-set regression cases are preserved, and shutdown cases use 
tree-model operations with 1.3's existing exception wrapping.
   
   Validation:
   
   - Spotless passed for `iotdb-client/session`.
   - Built the matching TsFile 1.1.5-SNAPSHOT dependency from source.
   - On the original 1.3 implementation, all 7 new regression cases failed (6 
assertion failures and 1 error).
   - Clean reactor `mvn clean test -pl iotdb-client/session -am 
-Dtest=SessionPoolCloseTest,SessionPoolTest,SessionPoolExceptionTest 
-Dsurefire.failIfNoSpecifiedTests=false`: 110 tests passed, 0 failures, 0 
errors, 0 skipped on JDK 17.
   - Verified the tested Java files match the committed backport exactly.
   
   Target base: 14d9c0c156281e43b6912399d027184bf3806f1f.
   


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