zclllyybb opened a new pull request, #65301:
URL: https://github.com/apache/doris/pull/65301
### What problem does this PR solve?
Issue Number: N/A
Related PR: #65288
Problem Summary:
This is the branch-4.0 backport of #65288.
The backend tablets schema scanner reads tablet rowset metadata while
compaction can rewrite the same rowset maps under the tablet header lock. That
can race when the scanner calculates rowset-derived columns such as size,
version count, segment count, compaction score, update time, and overlap state.
This change snapshots the tablet scalar fields, rowset metadata pointers,
and max-version rowset while holding the tablet header shared lock, then
releases the lock before aggregating rowset-derived values and filling the
output block. The branch-4.0 scanner uses the older `exec/schema_scanner` path
and does not have row-binlog rowset metadata, so this backport snapshots
`all_rs_metas()` only.
### Release note
None
### Check List (For Author)
- Test:
- Manual test
- `PATH=/mnt/disk6/common/ldb_toolchain_toucan/bin:$PATH
./build-support/clang-format.sh`
- `PATH=/mnt/disk6/common/ldb_toolchain_toucan/bin:$PATH
./build-support/check-format.sh`
- `git diff --check`
- `GIT_ALLOW_PROTOCOL=file ./build.sh --be -j 90`
- Behavior changed: No
- 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]