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

   ## Purpose of the PR
   
   - close #3053
   
   HStore range-index queries with a limit, offset, or page cursor require 
globally
   ordered backend keys. The previous multi-partition path exposed partition
   iteration order and an internal storage cursor, which could return the wrong
   limited slice or skip entries on continuation.
   
   This PR adds an explicit ordered range-scan path while leaving unbounded 
count,
   joint-index, and cleanup scans on the existing path.
   
   ## Main Changes
   
   ```mermaid
   flowchart LR
       subgraph Store1["Store 1"]
           P1["Partition 1"] --> M1["Local K-way merge"]
           P2["Partition 2"] --> M1
       end
       subgraph Store2["Store 2"]
           P3["Partition 3"] --> M2["Local K-way merge"]
           P4["Partition 4"] --> M2
       end
       M1 --> G["Client global K-way merge"]
       M2 --> G
       G --> R["Ordered range-index results"]
   ```
   
   - Preserve the next unread physical index key as the HugeGraph page cursor 
and
     preserve ordered index IDs through the following element lookup.
   - Add `ORDER_BY_KEY` to the HStore scan protocol. Each Store merges its local
     leader-partition iterators, and the client globally merges one stream per
     Store instead of opening one stream per partition.
   - Use fixed 64-entry pages, request later pages only when a Store's current 
page
     is exhausted, and bound concurrent first-page initialization to eight
     streams.
   - Keep legacy scan ordering and cursor behavior unchanged for requests that 
do
     not explicitly select the ordered path. Client and Store nodes must be
     upgraded together before using ordered range scans.
   
   ## 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:
       - `ClientSuiteTest`: 13 tests passed.
       - `ServerSuiteTest`: 6 tests passed.
       - `HstoreSessionsImplTest` and `HstoreTableTest`: 8 tests passed.
       - `GraphIndexTransactionTest`, `IdHolderTest`, and `QueryResultsTest`: 4 
tests passed.
       - `git diff --check` passed.
   
   ## 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
   - [x]  The public API
   - [x]  Other affects: extends the HStore scan protocol; coordinated client 
and Store upgrades are required for the ordered path.
   - [ ]  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