apache / apache/doris

[Bug] compaction 过程中如果有 balance 或者其他能导致state change 。导致无法compaction

Open
#61,823 2 comments 0 reactions 1 assignee Claimed by @Tech-Circle-48 View on GitHub
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
520

Description

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.

### Version

所有版本

### What's Wrong?

auto st = thread_pool->submit_func([tablet, compaction = std::move(compaction),
compaction_type, permits, force, this]() {
if (!tablet->can_do_compaction(tablet->data_dir()->path_hash(), compaction_type)) {
LOG(INFO) << "Tablet state has been changed, no need to begin this compaction "
"task, tablet_id="
<< tablet->tablet_id() << "tablet_state=" << tablet->tablet_state();
return;
}
tablet->compaction_stage = CompactionStage::EXECUTING;
TEST_SYNC_POINT_RETURN_WITH_VOID("olap_server::execute_compaction");
tablet->execute_compaction(*compaction);
if (!force) {
_permit_limiter.release(permits);
}
_pop_tablet_from_submitted_compaction(tablet, compaction_type);
tablet->compaction_stage = CompactionStage::NOT_SCHEDULED;
});

[olap_server.cpp](https://github.com/user-attachments/files/26301590/olap_server.cpp) 1016行。

### What You Expected?

修复一下吧,这个bug找了一天了😂。在提供一下生产中遇到这个问题不升级的解决方案吧。

### How to Reproduce?

_No response_

### Anything Else?

_No response_

### Are you willing to submit PR?

- [x] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.