airborne12 opened a new pull request, #71249:
URL: https://github.com/apache/doris/pull/71249
### What problem does this PR solve?
Issue Number: None
Related PR: #71128
Problem Summary:
Pick of #71128 (merged as 6a1da3db536) to branch-4.2. With
`enable_light_index_change = false`, `BUILD INDEX` returns OK but creates no
index change job, so nothing is built and the user gets no sign of it. After
this PR it fails with an error that names the config.
The automatic pick conflicted, so this is a manual pick of the same commit:
- branch-4.2 has no `DROP INDEX ... PARTITION`: its grammar only has `DROP
INDEX name`, so that statement never reaches this branch. The fix therefore
covers `BUILD INDEX` only, and the message reads `BUILD INDEX requires
enable_light_index_change=true`.
- The branch-4.2 call `buildOrDeleteTableInvertedIndices(..., false)` is
kept: master passes `isDropIndex` there for `DROP INDEX ... PARTITION`, which
branch-4.2 does not have.
- From the test file only
`testIndexJobStatementsRejectedWhenLightIndexChangeDisabled` is taken; the
neighbouring master tests belong to other PRs. Its `DROP INDEX ... PARTITION`
case is dropped.
| File | Source hunk | Status |
|---|---|---|
| `SchemaChangeHandler.java` | `@@ -2753,10 +2753,13 @@ public class
SchemaChangeHandler extends AlterHandler {` | Adapted: same reject branch;
comment and message name only BUILD INDEX; branch-4.2 `false` argument kept |
| `SchemaChangeHandlerTest.java` | `@@ -1592,6 +1592,41 @@ public class
SchemaChangeHandlerTest extends TestWithFeService {` | Adapted: `BUILD INDEX`
and `BUILD INDEX ... PARTITION` cases kept, `DROP INDEX ... PARTITION` case
dropped, assertion matches the branch-4.2 message |
### Release note
With `enable_light_index_change = false`, `BUILD INDEX` now fails with an
error instead of returning OK without building anything.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
On this branch `SchemaChangeHandlerTest`, `IndexChangeJobTest`,
`CloudIndexTest` and `VariantValuesIndexChangeTest` pass (59 tests, run with
`run-fe-ut.sh`), including
`testIndexJobStatementsRejectedWhenLightIndexChangeDisabled`; fe-core
checkstyle passes. Regression lanes are left to CI (`run buildall`).
- Behavior changed:
- [ ] No.
- [x] Yes. With `enable_light_index_change = false`, `BUILD INDEX`
returns an error instead of OK. Nothing changes while the config is `true`, its
default.
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]