You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/19 09:16:03 UTC
[GitHub] [incubator-doris] kangpinghuang commented on a change in pull
request #973: Delete tablet related txns when drop tablet
kangpinghuang commented on a change in pull request #973: Delete tablet related txns when drop tablet
URL: https://github.com/apache/incubator-doris/pull/973#discussion_r276940863
##########
File path: be/src/agent/task_worker_pool.cpp
##########
@@ -481,15 +481,23 @@ void* TaskWorkerPool::_drop_tablet_worker_thread_callback(void* arg_this) {
vector<string> error_msgs;
TStatus task_status;
AgentStatus status = DORIS_SUCCESS;
- OLAPStatus drop_status = StorageEngine::instance()->tablet_manager()->drop_tablet(drop_tablet_req.tablet_id, drop_tablet_req.schema_hash);
- if (drop_status != OLAP_SUCCESS && drop_status != OLAP_ERR_TABLE_NOT_FOUND) {
- status = DORIS_ERROR;
- }
- if (status != DORIS_SUCCESS) {
- OLAP_LOG_WARNING(
- "drop table failed! signature: %ld", agent_task_req.signature);
- error_msgs.push_back("drop table failed!");
- status_code = TStatusCode::RUNTIME_ERROR;
+ TabletSharedPtr dropped_tablet = StorageEngine::instance()->tablet_manager()->get_tablet(
+ drop_tablet_req.tablet_id, drop_tablet_req.schema_hash);
+ if (dropped_tablet != nullptr) {
+ OLAPStatus drop_status = StorageEngine::instance()->tablet_manager()->drop_tablet(
+ drop_tablet_req.tablet_id, drop_tablet_req.schema_hash);
+ if (drop_status != OLAP_SUCCESS && drop_status != OLAP_ERR_TABLE_NOT_FOUND) {
+ status = DORIS_ERROR;
+ }
+ if (status != DORIS_SUCCESS) {
+ OLAP_LOG_WARNING(
Review comment:
LOG(WARNING)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org