Yukang-Lian opened a new pull request, #67639:
URL: https://github.com/apache/doris/pull/67639
## Proposed changes
This PR supersedes #66878. It preserves @dzr171712's authorship with a
`Co-authored-by` trailer and completes the consistency hardening and test
coverage found during follow-up review.
### What problem does this PR solve?
Issue Number: None
Related PR: #66878
Problem Summary: With compaction read-write separation enabled, different
commit paths could leave tablet owner metadata stale or untrusted. A reader
compute group could schedule compaction before owner metadata refresh; lazy
commits, two-phase retries, delete predicates, versioned reads, and heavy
schema changes did not consistently preserve the latest writer. Cluster status
timestamps were also not durably tied to status transitions, making takeover
decisions unstable.
### What changes are included?
- Bind tablet ownership to the actual first BE rowset writer; FE-provided
hints are non-authoritative and a forged pre-bound flag is cleared at
transaction begin.
- Treat zero-segment delete-predicate rowsets as logical mutations, and
return a bounded owner-update result for immediate, lazy, sub-transaction,
retry, and two-phase commit paths.
- Persist a monotonic owner epoch, update BE caches only with newer
generations, and fan owner notifications out to every alive BE in the writer
compute group.
- Require new compaction requests to carry a complete owner authorization
token and validate it in the same MetaService transaction that creates base,
cumulative, or full compaction jobs.
- Preserve canonical owner metadata across versioned reads, mixed-version
aggregates, heavy schema change, and rolling upgrades.
- Persist cluster status transition timestamps and keep BE takeover timing
stable; the first unavailable status snapshot fails closed.
### Compatibility and rollout
Deploy MetaService first, followed by BE and FE. During a rolling upgrade,
legacy owner-free metadata remains readable, while new compaction requests use
the transactional owner token. Draining in-flight loads during the rollout is
recommended where practical.
### Release note
Cloud compaction read-write separation now tracks and validates the latest
writer compute group consistently across load, schema change, retries, and
rolling upgrades.
### Check List (For Author)
- Test:
- BE ASAN unit tests: 101 tests from 6 suites passed.
- Cloud ASAN unit tests: 13 targeted
owner/epoch/token/status/versioned-read cases passed.
- FE unit tests: 28 tests passed; Maven checkstyle passed across 60
modules.
- Regression tests: added five Docker suites; framework compilation and
all five suite-loading checks passed locally. Docker execution is pending
hosted CI because no current-branch runtime image was available locally.
- C++ format, changed-line clang-tidy, patch whitespace, and BE
header-hygiene checks passed.
- Behavior changed: Yes. Compaction is rejected unless the requester is the
current owner or presents a valid takeover/pressure token.
- Does this need documentation: No.
--
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]