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

   ## Purpose of the PR
   
   - close #3166
   
   `ShortestPathTraverser` could return after finding a path without closing 
the current backend edge iterator. With HStore, the abandoned iterator could 
leave its remote scanner active and Store threads waiting to deliver pages that 
the client no longer consumed.
   
   The same ownership gap also existed in the backward search and in the 
iterator used by the super-node probe.
   
   ## Main Changes
   
   - Retain the original iterator returned by `edgesOfVertex()` in both 
`forward()` and `backward()`.
   - Close that source iterator in `finally`, including early-return and 
exception paths. The source iterator is closed directly because 
`skipSuperNodeIfNeeded()` may consume and replace it.
   - Close the iterator used by `superNode()` after counting it.
   - Add focused regression coverage for forward match, backward match, and 
super-node probe cleanup, and register it in `UnitTestSuite`.
   
   The change does not modify traversal semantics, degree/capacity limits, 
request timeouts, HStore code, configuration, or public APIs.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests 
here)*.
   - [x] Need tests and can be verified as follows:
       - On unpatched `apache/master`, the new test preserves the expected path 
results and fails all three iterator-close assertions: `Tests run: 3, Failures: 
3`.
       - On this branch, `ShortestPathTraverserTest` passes: `OK (3 tests)`.
       - `MAVEN_OPTS='-Xms64m -Xmx256m' mvn clean compile -pl 
hugegraph-server/hugegraph-test -am -Dmaven.javadoc.skip=true` completes with 
`BUILD SUCCESS` for all 21 affected reactor modules.
       - `mvn editorconfig:format` completes with `BUILD SUCCESS`, and `git 
diff --check` reports no errors.
   
   Additional HStore runtime validation of the same production patch used one 
PD, one Store, and one Server with the full SNAP Twitter-2010 graph (41,652,230 
vertices and 1,468,365,182 directed edges). The bounded shortest-path gate 
completed 1,516/1,516 warmup and 5,791/5,791 measured requests with zero 
errors, zero swap, stable service PIDs, and zero blocked `HgChannel.send` 
frames at all sampled points through 600 seconds.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ]  Dependencies ([add/update 
license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses)
 info & 
[regenerate_known_dependencies.sh](../install-dist/scripts/dependency/regenerate_known_dependencies.sh))
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   - [x]  Nope
   
   ## Documentation Status
   
   - [ ]  `Doc - TODO`
   - [ ]  `Doc - Done`
   - [x]  `Doc - No Need`
   


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