[Bug] Precise union drops repeated keys in the SortShuffle path
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Read UnionFilterIterator.java, especially NoRepeatValueIterator.hasNext() and saveElement(), then trace how the reducer handles comparator-equal groups and EOF. Reproduce with 20,000 keys occurring twice and check behavior across flush boundaries and repeated probes. Done means each matching name group emits one representative while preserving the intended representative/value rule.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Type
Logic / missing results in precise union queries.
Environment
Development source reviewed in PR #3395, Java 17. Reproduced with the production iterators and SortShuffle in a standalone JVM; no running Store cluster was used.
Expected and actual behavior
Once UnionFilterIterator has more than 10,000 map entries, it selects the SortShuffle/reducer path. NoRepeatValueIterator omits an entire comparator-equal group when that group occurs more than once, rather than returning one representative.
A probe with 20,000 keys, each read twice returns 0 rows; expected 20,000 rows, one per key. Each occurrence is a newly allocated BackendColumn with identical name/value bytes for that key.
The same query shape should retain each overlapping key once. MapUnionIterator already does so on the alternate small-query path.
Reproduction
- Generate keys as four-byte integer arrays and two occurrences per key, with fresh BackendColumn objects and arrays for every row.
- Populate an IntersectionWrapper from the first pass and call
proc(); all keys in this dataset are repeated candidates. - Construct UnionFilterIterator over an independent second pass, using the production BackendColumn serializer and name comparator.
- Consume normally with
while (iterator.hasNext()) { iterator.next(); count++; }. The observed count is zero.
The 10,000 threshold selects the union's sorting branch. SortShuffle has its own higher physical-file threshold, so this defect can occur before it writes an actual spill file; its file-backed path uses the same reducer.
Cause and focused follow-up
saveElement() preserves repeated candidates for sorting, but NoRepeatValueIterator.hasNext() skips groups where its duplicate counter is positive, including the final group. Fix reduction to emit a representative once for each matching name group, and cover repeated keys across flush boundaries, repeated probes, and EOF. Preserve the intended representative/value rule.
Sources: UnionFilterIterator and reducer, MapUnion alternate query path.
This is independent of the in-memory map-key defect tracked in https://github.com/apache/hugegraph/issues/3396 and predates the changed iterator-state logic in PR #3395. Keep it as a separate correctness fix rather than expanding that PR.
Issue search performed for NoRepeatValueIterator and UnionFilterIterator; no matching existing issue was found.
- Ngôn ngữ chính
- Java
- Star
- 3.2k
- Fork
- 642
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 100
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/hugegraph
-
[Bug] PD task REST: balanceLeaders throws a bare HTTP 500 during the balance-shard window, and task responses cannot be told apart from a no-op or a follower answerCó thể đã có người làm @pallavithegod đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apache/hugegraph#3231 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] In-memory union and intersection fail to combine equal scan rowsCó thể đã có người làm @vaidikgarg-bit đã nhận hôm nay. Đang mởbug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
apache/hugegraph#3396 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] PD TTL cleanup deletes the marker-shaped name instead of the expired key, so expired values stay in the store until readCó thể đã có người làm @bitflicker64 đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/hugegraph
Issue tương tự
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixCó thể đã có người làm @ItsDeadlyProgrammer đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appsmithorg/appsmith#42471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
code-maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
carlos-emr/carlos#5258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: author create/update with an unknown avatarId returns 404 instead of 400 UNKNOWN_REFERENCECó thể đã có người làm @Vinu2111 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
atomityhq/blog-cms#59 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PlatformSpecific.hasGreenThreads incorrectly returns false for JDK updates and non-GA versionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày