You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "SebastianGruza (via GitHub)" <gi...@apache.org> on 2026/09/14 16:20:32 UTC
[PR] fix(core): don't re-emit the batch-boundary record when paging with a limit that is a multiple of 500 [hugegraph]
SebastianGruza opened a new pull request, #3207:
URL: https://github.com/apache/hugegraph/pull/3207
## Purpose of the PR
- close #3191
Following the `page` token with a `limit` that is a multiple of 500 returns the last element of page *k* again as the first element of page *k+1*, one duplicate per page boundary. It affects every query whose result is one backend entry with more than 500 columns: the edges of one owner vertex (no condition, sort-key prefix or range, either direction) and vertex queries by label through the label index. RocksDB and HStore alike, because it is server code; secondary/range/search index queries are not affected (each index key is its own entry).
## Main Changes
`BinaryEntryIterator.fetch()` appended a record to the current entry and only then checked whether that entry had reached `INLINE_BATCH_SIZE` (500) to break. The next page restarts inclusively from `results.position()`, which at that point already points at the appended record, so a page ending exactly at a batch boundary re-emits it. The change starts a **new** entry with the record once the current entry already holds a full batch, so `position()` never points at a record that has been emitted. No other behaviour changes; limits that are not a multiple of 500 take exactly the same path as before.
## Verifying these changes
- [ ] Trivial rework / code cleanup without any test coverage.
- [ ] Already covered by existing tests.
- [x] Need tests and can be verified as follows:
- `EdgeCoreTest.testQueryOutEdgesOfVertexInPagingAtBatchBoundary`: 1 200 edges of one vertex, paged with `limit` 400 / 500 / 600 / 1000; asserts the total count and the number of distinct ids for each limit. Red on master for 500 and 1000 (1 202 and 1 201 results), green with the change.
- `EdgeCoreTest` and `VertexCoreTest` on `rocksdb` and `memory` (`core-test` profile): all green.
- Same result set on a 3-store HStore cluster and a RocksDB oracle for the paged shapes of issue #3191 (`n=1214 uniq=1212` before, `1212/1212` after), measured with the black-box suite linked in the issue.
## Does this PR potentially affect the following parts?
- [ ] Dependencies
- [ ] Modify configurations
- [ ] The public API
- [x] Nope
## Documentation Status
- [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: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] fix(server): handle page correctly when limit(500 * N) [hugegraph]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #3207:
URL: https://github.com/apache/hugegraph/pull/3207
--
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: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] fix(core): don't re-emit the batch-boundary record when paging with a limit that is a multiple of 500 [hugegraph]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3207:
URL: https://github.com/apache/hugegraph/pull/3207#issuecomment-5674190685
## [Codecov](https://app.codecov.io/gh/apache/hugegraph/pull/3207?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 93.25%. Comparing base ([`60c8803`](https://app.codecov.io/gh/apache/hugegraph/commit/60c8803d5a85943eaa05e74eb37fe7d57b2256a0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2fd46a6`](https://app.codecov.io/gh/apache/hugegraph/commit/2fd46a6a4d54959036cf2d5189d1579e359c81ab?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #3207 +/- ##
=============================================
+ Coverage 37.86% 93.25% +55.39%
+ Complexity 6586 65 -6521
=============================================
Files 800 9 -791
Lines 68985 267 -68718
Branches 9172 22 -9150
=============================================
- Hits 26120 249 -25871
+ Misses 39796 8 -39788
+ Partials 3069 10 -3059
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/hugegraph/pull/3207?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org