CalvinKirs opened a new pull request, #66371:
URL: https://github.com/apache/doris/pull/66371
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
`plan_nereids_dump` is a leftover session variable. It only has meaning
while the planner replays a minidump file, and on that path the flag is set
programmatically by `MinidumpUtils.setConnectContext()`. Nothing in the product
code, the regression suite or the docs sets it through `SET` — the only thing
exposing it as a session variable achieves is letting a normal session enter
the replay-only planner mode, which is not a supported usage and produces a
plan that cannot be executed.
This PR:
1. Drops the `plan_nereids_dump` session variable: the `PLAN_NEREIDS_DUMP`
constant and the `@VarAttr` registration are removed, and the underlying flag
becomes an internal private field of `SessionVariable`. It is still set by
`MinidumpUtils` when replaying a dump, so `PLAY '<dumpfile>'` keeps working
exactly as before. Being un-annotated it is no longer exposed by `SET` /
`SELECT @@` / `SET_VAR` hints, and no longer forwarded to master or serialized
into a dump file.
2. Adds `plan_nereids_dump` to `VariableMgr.REMOVED_SESSION_VAR_NAMES`, so
old scripts, JDBC connection-init statements and replayed `SET GLOBAL` edit
logs keep silently no-oping instead of failing with
`ERR_UNKNOWN_SYSTEM_VARIABLE` during a rolling upgrade.
No behavior change for normal queries; the minidump dump/replay path is
untouched.
### Release note
Removed the unused session variable `plan_nereids_dump`.
### Check List (For Author)
- Test
- [x] No need to test or manual test. Explain why:
- [x] Previous test can cover this change.
`SessionVariablesTest` + `VariableMgrTest`: `Tests run: 26, Failures: 0,
Errors: 0`.
FE build (`sh build.sh --fe`) passes with checkstyle enabled.
- Behavior changed:
- [x] Yes. `plan_nereids_dump` is no longer a session variable. `SET
plan_nereids_dump = ...` and `SELECT @@plan_nereids_dump` are silently ignored
(the removed-variable compatibility path) instead of taking effect.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]