You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport proto3 row caching for query consolidator to slack-19.0 (#847)
* Backport proto3 row caching for query consolidator to slack-19.0
Backport of vitessio#19872, which was already cherry-picked to
slack-22.0 in #846. When multiple queries are consolidated,
the original query now pre-computes and caches the proto3 row encoding so
that N waiters share the encoded rows instead of each redundantly calling
RowsToProto3.
Gated behind --consolidator-cache-proto3-rows (default false).
Key v19-specific adaptations:
- No InsertIDChanged field (v22-only)
- AppendResult uses src.InsertID != 0 (not InsertIDUpdated())
- Benchmarks use for/b.N loops (Go 1.22, no b.Loop())
- Sizegen format: no blank lines between functions
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
AI disclosure: Claude Code assisted with development. Every line of code was either written by or carefully reviewed by me :)
* Align flag description with v22 backport
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
AI disclosure: Claude Code assisted with development. Every line of code was either written by or carefully reviewed by me :)
* Fix sizegen-generated `cached_size.go` files
Two issues from hand-editing the sizegen output:
- `Result.CachedSize` alloc size was 144 (wrong) instead of 128
(the struct is exactly 128 bytes with `proto3Rows`)
- `Row.CachedSize` had fields in wrong order and used qualified
type name in comment instead of resolved `[]byte`
AI disclosure: Claude Code assisted with development. Every line of code was either written by or carefully reviewed by me :)
* Fix TestWaitForPosError expected strings for new proto3Rows field
The new proto3Rows field on sqltypes.Result changes the %v output,
adding a trailing ` []` to the formatted struct. Update the two
expected error strings in TestWaitForPosError to match.
AI disclosure: Claude Code assisted with development. Every line of code was either written by or carefully reviewed by me :)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Tanjin Xu <109303790+tanjinx@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: go/flags/endtoend/vtcombo.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ Flags:
51
51
--config-path strings Paths to search for config files in. (default [{{ .Workdir }}])
52
52
--config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s)
53
53
--config-type string Config file type (omit to infer config type from file extension).
54
+
--consolidator-cache-proto3-rows If true, the consolidation leader pre-caches proto3-encoded rows so that waiters avoid redundant encoding work.
54
55
--consolidator-query-waiter-cap int Configure the maximum number of clients allowed to wait on the consolidator.
55
56
--consolidator-query-waiter-cap-method string Configure the method when consolidator waiter cap is exceeded. Options: fallthrough, reject. (default "fallthrough")
56
57
--consolidator-stream-query-size int Configure the stream consolidator query size in bytes. Setting to 0 disables the stream consolidator. (default 2097152)
Copy file name to clipboardExpand all lines: go/flags/endtoend/vttablet.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,7 @@ Flags:
85
85
--config-path strings Paths to search for config files in. (default [{{ .Workdir }}])
86
86
--config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s)
87
87
--config-type string Config file type (omit to infer config type from file extension).
88
+
--consolidator-cache-proto3-rows If true, the consolidation leader pre-caches proto3-encoded rows so that waiters avoid redundant encoding work.
88
89
--consolidator-query-waiter-cap int Configure the maximum number of clients allowed to wait on the consolidator.
89
90
--consolidator-query-waiter-cap-method string Configure the method when consolidator waiter cap is exceeded. Options: fallthrough, reject. (default "fallthrough")
90
91
--consolidator-stream-query-size int Configure the stream consolidator query size in bytes. Setting to 0 disables the stream consolidator. (default 2097152)
0 commit comments