imbajin opened a new pull request, #3354: URL: https://github.com/apache/hugegraph/pull/3354
## Purpose of the PR Closing a scan can send a stop request while the response callback ends the same gRPC request stream. These calls previously overlapped on a non-thread-safe observer. Serialize request sends and terminal calls so an in-flight send finishes before the stream is ended, and suppress sends or repeated terminal calls afterward. ## Main Changes - Guard request `onNext`, `onCompleted` and timeout cancellation with one lock. - Keep final-page delivery, original errors and unavailable-channel retirement outside the request lock. - Add latch-controlled regressions for completion during a send and timeout/late-error handling. ## Verifying these changes - [x] Need tests and can be verified as follows: The regression fails against the old implementation and passes with serialization. Existing scanner fixtures, Java 17 formatting and clean reactor compilation pass. Tests use injected observers and do not open listeners or start services. A separate in-memory experiment with actual gRPC/Netty framing classes confirms that the unsafe send/half-close interleaving can leave a buffer undelivered until explicit disposal. It does not simulate the complete transport lifecycle or establish that the historical leak report came from that same interleaving. Live HStore acceptance remains pending. ## Does this PR potentially affect the following parts? - [ ] Dependencies - [ ] Modify configurations - [ ] The public API - [x] Other affects (scan request lifecycle) - [ ] Nope ## Documentation Status - [ ] `Doc - TODO` - [ ] `Doc - Done` - [x] `Doc - No Need`: internal synchronization fix preserving the existing scan API and configuration. -- 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]
