pengxiangyu commented on code in PR #10731:
URL: https://github.com/apache/doris/pull/10731#discussion_r923059632
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -438,14 +438,18 @@ void
TaskWorkerPool::_drop_tablet_worker_thread_callback() {
error_msgs.push_back("drop table failed!");
status_code = TStatusCode::RUNTIME_ERROR;
}
- // if tablet is dropped by fe, then the related txn should also be
removed
-
StorageEngine::instance()->txn_manager()->force_rollback_tablet_related_txns(
- dropped_tablet->data_dir()->get_meta(),
drop_tablet_req.tablet_id,
- drop_tablet_req.schema_hash, dropped_tablet->tablet_uid());
- // We remove remote rowset directly.
- // TODO(cyx): do remove in background
- if (drop_tablet_req.is_drop_table_or_partition) {
- dropped_tablet->remove_all_remote_rowsets();
+ if (!drop_status.is_aborted()) {
+ // if tablet is dropped by fe, then the related txn should
also be removed
+
StorageEngine::instance()->txn_manager()->force_rollback_tablet_related_txns(
+ dropped_tablet->data_dir()->get_meta(),
drop_tablet_req.tablet_id,
+ drop_tablet_req.schema_hash,
dropped_tablet->tablet_uid());
+ if (drop_tablet_req.is_drop_table_or_partition) {
+ // We remove remote rowset directly.
Review Comment:
Local file and OlapMeta are deleted in TabletManager::start_trash_sweep();
remote file need to be deleted in start_trash_sweep() too, otherwise, it will
cause remote file remains but OlapMeta is removed.
--
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]