Skip to content

Commit

Permalink
[#10220] docdb: splitting: deprecate TabletForSplitPB.tablets_for_split
Browse files Browse the repository at this point in the history
Summary: We no longer rely on sending split candidates from the TS to the master, via heartbeat, so we could mark the `TabletForSplitPB.tablets_for_split field` as deprecated and get rid of the master_service code to process these via heartbeats.

Test Plan: jenkins

Reviewers: bogdan, timur

Reviewed By: timur

Subscribers: bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D13545
  • Loading branch information
nimwijetunga committed Oct 25, 2021
1 parent b314232 commit 7adb6ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion src/yb/master/master.proto
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ message TSHeartbeatRequestPB {
optional int32 cluster_config_version = 8;

// List of candidate tablets for split based on tablet splitting strategy and settings.
repeated TabletForSplitPB tablets_for_split = 9;
repeated TabletForSplitPB DEPRECATED_tablets_for_split = 9;

// Physical time on tablet server
optional fixed64 ts_physical_time = 10;
Expand Down
13 changes: 0 additions & 13 deletions src/yb/master/master_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,6 @@ void MasterServiceImpl::TSHeartbeat(const TSHeartbeatRequestPB* req,
if (!req->has_tablet_report() || req->tablet_report().is_incremental()) {
// Only process split tablets if we have plenty of time to process the work (> 50% of timeout).
auto safe_time_left = CoarseMonoClock::Now() + (FLAGS_heartbeat_rpc_timeout_ms * 1ms / 2);
if (rpc.GetClientDeadline() > safe_time_left) {
for (const auto& tablet : req->tablets_for_split()) {
VLOG(1) << "Got tablet to split: " << AsString(tablet);
const auto split_status = server_->catalog_manager()->SplitTablet(tablet.tablet_id());
if (!split_status.ok()) {
if (MasterError(split_status) == MasterErrorPB::REACHED_SPLIT_LIMIT) {
YB_LOG_EVERY_N_SECS(WARNING, 60 * 60) << split_status;
} else {
LOG(WARNING) << split_status;
}
}
}
}

safe_time_left = CoarseMonoClock::Now() + (FLAGS_heartbeat_rpc_timeout_ms * 1ms / 2);
if (rpc.GetClientDeadline() > safe_time_left) {
Expand Down

0 comments on commit 7adb6ff

Please sign in to comment.