dataroaring commented on code in PR #10007:
URL: https://github.com/apache/incubator-doris/pull/10007#discussion_r891895567
##########
be/src/olap/task/engine_publish_version_task.cpp:
##########
@@ -83,6 +83,12 @@ Status EnginePublishVersionTask::finish() {
res = Status::OLAPInternalError(OLAP_ERR_PUSH_TABLE_NOT_EXIST);
continue;
}
+ {
+ std::shared_lock rdlock(tablet->get_header_lock());
+ if (tablet->max_version().second + 1 != par_ver_info.version) {
+ return
Status::OLAPInternalError(OLAP_ERR_ROWSET_VERSION_NOT_CONTINUOUS);
Review Comment:
Could we use MISSING_VERSION error here?
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -707,6 +708,14 @@ void
TaskWorkerPool::_publish_version_worker_thread_callback() {
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
+ if (res == OLAP_ERR_ROWSET_VERSION_NOT_CONTINUOUS) {
+ std::unique_lock<std::mutex>
worker_thread_lock(_worker_thread_lock);
+ // push back to task queue if publish version not continuous
+ // make sure publish version task run in order
+ _tasks.push_back(agent_task_req);
+ _worker_thread_condition_variable.notify_one();
Review Comment:
This thread is working, so we donot need notify here.
--
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]