Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions be/src/agent/task_worker_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ bool register_task_info(const TTaskType::type task_type, int64_t signature) {
// no need to report task of these types
return true;
}
if (task_type == TTaskType::type::DROP && config::is_cloud_mode()) {
// cloud no need to report drop task status
return true;
}

if (signature == -1) { // No need to report task with unintialized signature
return true;
Expand Down Expand Up @@ -1872,6 +1868,8 @@ void drop_tablet_callback(StorageEngine& engine, const TAgentTaskRequest& req) {

void drop_tablet_callback(CloudStorageEngine& engine, const TAgentTaskRequest& req) {
const auto& drop_tablet_req = req.drop_tablet_req;
// here drop_tablet_req.tablet_id is the signature of the task, see DropReplicaTask in fe
Defer defer = [&] { remove_task_info(req.task_type, req.signature); };
DBUG_EXECUTE_IF("WorkPoolCloudDropTablet.drop_tablet_callback.failed", {
LOG_WARNING("WorkPoolCloudDropTablet.drop_tablet_callback.failed")
.tag("tablet_id", drop_tablet_req.tablet_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ suite('test_clean_tablet_when_drop_force_table', 'docker') {
options.beConfigs += [
'report_tablet_interval_seconds=1',
'write_buffer_size=10240',
'write_buffer_size_for_agg=10240'
'write_buffer_size_for_agg=10240',
'sys_log_verbose_modules=task_worker_pool'
]
options.setFeNum(3)
options.setBeNum(3)
options.cloudMode = true
options.enableDebugPoints()

def checkBeLog = { String beLogPath ->
log.info("search be log path: {}", beLogPath)
def logFile = new File(beLogPath)
assertTrue(logFile.exists(), "BE log file not found: ${beLogPath}")
def queueZeroLine = logFile.readLines().find { line ->
line =~ /remove task info\. type=DROP, .*queue_size=0/
}
assertTrue(queueZeroLine != null,
"Expected to find log line with queue_size=0 in ${beLogPath}, but none matched.")
log.info("found queue_size=0 log line: {}", queueZeroLine)
}

def testCase = { tableName, waitTime, useDp=false->
def ms = cluster.getAllMetaservices().get(0)
Expand Down Expand Up @@ -191,6 +204,8 @@ suite('test_clean_tablet_when_drop_force_table', 'docker') {
}
}

String beLogPath = cluster.getBeByIndex(1).getLogFilePath()
checkBeLog(beLogPath)
}

docker(options) {
Expand Down
Loading