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
{{ message }}
Repository navigation
Commit 3dced98
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](thrift) Align TQueryOptions field ids with branch-4.2
### What problem does this PR solve?
Issue Number: None
Related PR: #68314, #68562
Problem Summary:
branch-4.1 and branch-4.2 assigned their own ids to TQueryOptions fields that were
picked from master, so the same option has different ids on the two lines and the same
id means different options:
master branch-4.2
183 enable_use_hybrid_sort 183 enable_aggregate_function_null_v2
189 enable_aggregate_function_null_v2 -
210 max_scan_mem_ratio 210 enable_use_hybrid_sort
213 file_presigned_url_ttl_seconds 213 max_scan_mem_ratio
219 enable_segment_limit_pushdown 219 ann_index_candidate_rows_threshold
220 enable_ann_index_result_cache 220 ann_index_candidate_rows_percent_threshold
221 ann_index_candidate_rows_threshold -
222 ann_index_candidate_rows_percent_threshold -
226 enable_prune_nested_column 226 enable_local_exchange_before_streaming_agg
227 new_version_bitmap_op_count 227 file_presigned_url_ttl_seconds
228 enable_local_exchange_before_streaming_agg 228 enable_hyperscan_fallback
229 coordinator_thrift_max_message_size 229 enable_paimon_rust_reader
230 supports_external_file_report_ack 230 enable_prune_nested_column
231 enable_hyperscan_fallback -
Thrift skips a field whose wire type differs from the receiver's definition, but a
bool that lands on another bool is read as that other option. During a rolling upgrade
from a 4.2 release to a release cut from master, a 4.2 FE talking to a new BE would turn
enable_aggregate_function_null_v2 into enable_use_hybrid_sort and read
enable_hyperscan_fallback as enable_local_exchange_before_streaming_agg, with no error
anywhere.
This renumbers master to the branch-4.2 ids for every shared field and moves the
master-only fields that sat on 4.2 ids to 233-236. 229 gets a placeholder
enable_paimon_rust_reader, the switch branch-4.1 and branch-4.2 carry at that id, so the id
cannot be handed to another field here; FE never sets it. The fields are reordered so ids
ascend again.
FE and BE refer to these fields by name, so no code changes. master has no release that
uses the old ids; a mixed-version master dev cluster must upgrade FE and BE together
across this change.
TQueryOptions also carries an older collision that no master change can fix: branch-3.1
and branch-4.0 both shipped ids 119-121 as keep_carriage_return,
enable_match_without_inverted_index and enable_fallback_on_missing_inverted_index, in a
different order on each branch, so a 3.1 FE talking to a 4.0 BE during that upgrade sends
enable_fallback_on_missing_inverted_index on the id the BE reads as keep_carriage_return.
To keep this from repeating, `gensrc/AGENTS.md` states the one rule behind the ids (every
definition means the same thing on both sides of every upgrade step, 3.1 → 4.0 → 4.1 → 4.2 →
master, and on disk) and how to review a change against it branch by branch; the root AGENTS.md
points to it, and the code-review skill gets a matching checkpoint, a module-guide row and a
protocol-compatibility item.
### Release note
None
### Check List (For Author)
- Test: Manual test
- thrift --gen cpp on PaloInternalService.thrift succeeds; a scan of all gensrc thrift and proto definitions reports no TQueryOptions id or name mismatch between this change and branch-4.2.
- Behavior changed: No
- Does this need documentation: No
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copy file name to clipboardExpand all lines: .claude/skills/code-review/SKILL.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,7 @@ The following checkpoints must be **individually confirmed with conclusions** du
87
87
- Can affected processes detect the change promptly without restart?
88
88
- Does it involve incompatible changes like function symbols or storage formats? If yes:
89
89
- Is compatibility code added? Can it correctly handle requests during rolling upgrades?
90
+
- Does it change `gensrc/thrift` or `gensrc/proto`? If yes: read every touched definition on HEAD and on each release branch and compare. An id or enum value that means something else on another branch, a reused id, or a new required field is a finding. (See `gensrc/AGENTS.md`)
90
91
- Are there functionally parallel code paths to the modified one? If yes:
91
92
- Should this modification be applied to other paths, and has it been?
92
93
- Are there special conditional checks? If yes:
@@ -205,6 +206,12 @@ Detailed module review guides live in `AGENTS.md` files in each source directory
Copy file name to clipboardExpand all lines: AGENTS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,10 @@ Every consumer of the **jdbc-flavored** `driver_url` (the jdbc / iceberg-jdbc /
18
18
19
19
Separately, any new outbound HTTP request the FE or BE issues to a host named by a non-SUPER user is an SSRF surface. Call it out explicitly in the PR description together with the privilege required to reach it.
20
20
21
+
## Thrift and Protobuf Field Ids
22
+
23
+
Every change under `gensrc/thrift` and `gensrc/proto` must keep every upgrade compatible (branch-3.1 → 4.0 → 4.1 → 4.2 → master): a field id or enum value means the same thing on every branch, an id is never reused, and a new field is optional. The rule and how to review against it are in `gensrc/AGENTS.md`; read it before touching those directories.
24
+
21
25
## When running in a WORKTREE directory
22
26
23
27
To ensure smooth test execution without interference between worktrees, the first thing to do upon entering a worktree directory is to check if `.worktree_initialized` exists. If not, execute `hooks/setup_worktree.sh`, setting `$ROOT_WORKSPACE_PATH` to the base directory (typically `${DORIS_REPO}`) beforehand. After successful execution, verify that `.worktree_initialized` has been touched and that `thirdparty/installed` dependencies exist correctly.
Everything under `gensrc/thrift` and `gensrc/proto` is shared by every release, on the wire and on disk. One rule: a change here must keep every upgrade compatible, 3.1 → 4.0 → 4.1 → 4.2 → master. A field id or enum value means the same thing on every branch that has it, an id is never reused, and a field that only one side has is optional.
4
+
5
+
## Review
6
+
7
+
Read every touched definition on HEAD and on each release branch that still takes picks (today branch-4.2, branch-4.1, branch-4.0 and branch-3.1; add a new branch when it is cut) with `git show <remote>/branch-4.2:<path>`. An id or enum value that means something else on another branch, a reused id, or a new required field is a finding. A collision that already exists between two shipped releases cannot be fixed by a PR; note it.
0 commit comments