Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Jefftree The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @Jefftree. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com> Signed-off-by: Jefftree <jeffrey.ying86@live.com>
bee35c0 to
203fa71
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files
... and 23 files with indirect coverage changes @@ Coverage Diff @@
## main #21358 +/- ##
==========================================
- Coverage 68.36% 68.02% -0.35%
==========================================
Files 428 426 -2
Lines 35277 35447 +170
==========================================
- Hits 24118 24112 -6
- Misses 9760 9939 +179
+ Partials 1399 1396 -3 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
e13f765 to
74212ab
Compare
|
/retest |
Fix interface stubs, mock servers, test logging, tracing, lint violations, and proto annotations that were missed in the initial RangeStream commit. Signed-off-by: Jefftree <jeffrey.ying86@live.com>
Add CountTotal flag to RangeOptions so treeIndex.Revisions() can skip counting all matching keys when only a limited page is needed. The first RangeStream chunk uses countTotal=true for the accurate total; subsequent chunks use countTotal=false, reducing per-page cost from O(total_keys) to O(limit). Signed-off-by: Jefftree <jeffrey.ying86@live.com>
Fix EOF handling, data race between channel close and concurrent SendMsg, and goroutine leak in the pipeStream adapter used by the gRPC proxy's RangeStream forwarding. Signed-off-by: Jefftree <jeffrey.ying86@live.com>
… cases Rewrite TestKVRange to use a table-driven approach with distinct values and ~25 test cases covering sorts, limits, count-only, keys-only, prefix, from-key, historical revisions, and min/max revision filters. Both Unary and Stream paths are exercised via StreamToUnary. Signed-off-by: Jefftree <jeffrey.ying86@live.com>
- Fix sort condition in rangeStream that was always true, causing all
requests to hit the unary fallback path instead of streaming.
- Deduplicate header merge logic in client/v3/kv.go into a shared
mergeRangeStreamChunk helper.
- Fix typo in comment ("send" -> "sent").
Signed-off-by: Jefftree <jeffrey.ying86@live.com>
Signed-off-by: Jefftree <jeffrey.ying86@live.com>
Implement GetStream on the namespace kvPrefix wrapper following the same pattern as Get: prefix the key and range_end, delegate to the inner KV, and strip the prefix from response keys in each streamed chunk. For the leasing KV wrapper, fall back to the inner KV since per-key cache does not apply to streaming ranges. Signed-off-by: Jefftree <jeffrey.ying86@live.com>
|
/retest |
RangeStream for etcd
Benchmark Results
Setup
HeapInusesampled at 1ms viaruntime.ReadMemStatsgo_memstats_heap_inuse_bytesfrom/metricssampled at 50msSmall values (100-byte values, 1 client, 10 iterations)
All comparisons relative to Stream (count once).
100k keys (~10 MB total data)
500k keys (~50 MB total data)
1M keys (~100 MB total data)
2M keys (~200 MB total data)
Large values (10k keys x 100KB values, ~1 GB total data)
1 client, 1 iteration
5 clients, 50 iterations
With concurrent clients and large values, single-shot collapses: 5 in-flight ~1 GB responses overwhelm both client and server memory, causing GC thrashing. Stream stays comfortable at ~1 GB server memory since chunks are sent and freed incrementally.
Key observations