contrueCT opened a new pull request, #3298:
URL: https://github.com/apache/hugegraph/pull/3298

   ## Purpose of the PR
   
   A request can dispose its native WriteBatch while its session is still 
registered in the pool. Concurrent graph truncation can retain that session and 
call `reset()` on the released native owner. Serialize close/reset and skip 
reset once the session is closed.
   
   Addresses the native close/reset item already tracked in #3242 and [the 
original 
review](https://github.com/hugegraph/hugegraph/pull/266#discussion_r4214095988).
 The release checklist stays open. Existing #3293 handles snapshot recovery and 
#3294 handles general lease/scan/RPC cleanup; neither currently fixes this 
batch disposal/reset interleaving.
   
   ## Main Changes
   
   - Use the same session monitor for native disposal and reset.
   - Ignore a closed session retained by an in-progress pool iterator.
   - Add a deterministic native regression that pauses after disposal but 
before close completes, then checks reset waiting and safe reuse of a retained 
closed reference.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [x] `RocksDBSessionsTest`: 20 tests pass on Java 17 with the standard JNI, 
with no failures/errors/skips.
   - [x] The same new test fails against the original master production class 
with `Reset touched a disposed native batch`. The fixture traps the invalid 
access before JNI; it does not intentionally crash the JVM.
   - [x] Affected Server reactor clean compilation, editorconfig formatting and 
`git diff --check` pass.
   
   Real Topling JNI execution was not repeated on this macOS arm64 host; the 
shared session implementation is exercised with the standard runtime.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ] Dependencies
   - [ ] Modify configurations
   - [ ] The public API
   - [x] Other affects: native session lifecycle synchronization
   - [ ] Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`
   - [ ] `Doc - Done`
   - [x] `Doc - No Need`: internal synchronization repair; no configuration or 
API contract changes.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to