You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "yujun777 (via GitHub)" <gi...@apache.org> on 2023/12/14 02:11:35 UTC
Re: [PR] [bugfix](tablet)fix the tablet will be deleted when clone due to concurrency [doris]
yujun777 commented on code in PR #25784:
URL: https://github.com/apache/doris/pull/25784#discussion_r1426082650
##########
fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java:
##########
@@ -784,16 +784,17 @@ private static void deleteFromMeta(ListMultimap<Long, Long> tabletDeleteFromMeta
continue;
}
+ BinlogConfig binlogConfig = new BinlogConfig(olapTable.getBinlogConfig());
Review Comment:
why move these two lines ahead ?
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1911,9 +1911,10 @@ void CloneTaskPool::_clone_worker_thread_callback() {
LOG_INFO("successfully clone tablet")
.tag("signature", agent_task_req.signature)
.tag("tablet_id", clone_req.tablet_id);
+ ++_s_report_version;
Review Comment:
只有在clone 新副本时,增加_s_report_version和上报_s_report_version。
对于已有的副本clone时,不要修改_s_report_version也不要上报它。 因为对一个已存在的tablet 增量clone,不会出现issue所说的问题。
假如增量clone时增大_s_report_version时,那可能导致fe丢弃上一个BE tablet report(旧report version)。这会有问题:假如BE很多增量clone, 那FE会频繁丢弃这个BE 的tablet report。
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1911,9 +1911,10 @@ void CloneTaskPool::_clone_worker_thread_callback() {
LOG_INFO("successfully clone tablet")
.tag("signature", agent_task_req.signature)
.tag("tablet_id", clone_req.tablet_id);
+ ++_s_report_version;
Review Comment:
只有在clone 新副本时,增加_s_report_version和上报_s_report_version。
对于已有的副本clone时,不要修改_s_report_version也不要上报它。 因为对一个已存在的tablet 增量clone,不会出现issue所说的问题。
假如增量clone时增大_s_report_version时,那可能导致fe丢弃上一个BE tablet report(旧report version)。这会有问题:假如BE很多增量clone, 那FE会频繁丢弃这个BE 的tablet report。
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1911,9 +1911,10 @@ void CloneTaskPool::_clone_worker_thread_callback() {
LOG_INFO("successfully clone tablet")
.tag("signature", agent_task_req.signature)
.tag("tablet_id", clone_req.tablet_id);
+ ++_s_report_version;
Review Comment:
line 1914, 1917: only clone a not exisist replica can add s_report_version and report s_report_version.
Because for clone a existsing replica, the report tablet no change.
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1911,9 +1911,10 @@ void CloneTaskPool::_clone_worker_thread_callback() {
LOG_INFO("successfully clone tablet")
.tag("signature", agent_task_req.signature)
.tag("tablet_id", clone_req.tablet_id);
+ ++_s_report_version;
Review Comment:
line 1914, 1917: only clone a not exisist replica can add s_report_version and report s_report_version.
Because for clone a existsing replica, the report tablet no change.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org