Yukang-Lian opened a new pull request, #62272:
URL: https://github.com/apache/doris/pull/62272

   ## Summary
   
   - Add dedicated `SC_COMPACTION_CONFLICT(101)` TStatusCode for the cross-V1 
compaction detection in cloud schema change
   - Include this error code in FE's schema change retry whitelist 
(`AlterJobV2.getRetryTimes()`)
   - Previously, this transient condition returned `INTERNAL_ERROR` which FE 
does not retry, causing the schema change job to be permanently cancelled
   
   ## Background
   
   The cloud SC compaction optimization allows new tablets to do compaction 
during schema change queue wait. A safety check detects when a compaction 
rowset crosses the alter_version (V1) boundary. This is a transient condition - 
on retry, V1 will be higher and the crossing rowset falls within `[2, V1']`.
   
   The bug was that FE treated `INTERNAL_ERROR` as a permanent failure (no 
retry), so this transient condition caused the entire schema change to be 
cancelled.
   
   ## Changes
   
   | File | Change |
   |------|--------|
   | `gensrc/thrift/Status.thrift` | Add `SC_COMPACTION_CONFLICT = 101` |
   | `be/src/common/status.h` | Register `TStatusError(SC_COMPACTION_CONFLICT, 
false)` |
   | `be/src/cloud/cloud_schema_change_job.cpp` | Cross-V1 check: 
`INTERNAL_ERROR` → `SC_COMPACTION_CONFLICT` |
   | `fe/.../alter/AlterJobV2.java` | Add `SC_COMPACTION_CONFLICT` to retry 
whitelist |
   | `fe/.../alter/AlterJobV2RetryTest.java` | Unit tests for `getRetryTimes()` 
(7 cases) |
   | `regression-test/.../test_sc_compaction_cross_v1_retry.groovy` | E2E test: 
cross-V1 failure → retry → success |
   
   ## Test plan
   
   - [x] FE unit test: `AlterJobV2RetryTest` - verifies retry whitelist for all 
error codes, null handling, and config toggle
   - [x] Regression test: `test_sc_compaction_cross_v1_retry` - uses debug 
points to trigger cross-V1, verifies SC stays RUNNING under override, then 
succeeds after override removal. Asserts data integrity and schema correctness.


-- 
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]

Reply via email to