Skip to content

Commit

Permalink
[#9182] Fix return from CatalogManager::ProcessTabletReport
Browse files Browse the repository at this point in the history
Summary:
It could happen that ProcessTabletReport could exit early, for instance because of failure in UpdateItems.
In this case it would just destroy rpc tasks, but RetryingTSRpcTask cannot be destroyed w/o calling abort on it.
It leads to check failure and process crash.

This diff fixes the issue by aborting all planned rpcs tasks with appropriate status.

Also extracted two functions ProcessCommittedConsensusState and ProcessTabletReportBatch from ProcessTabletReport.

Test Plan: ybd asan --gtest_filter NetworkFailureTest.DisconnectMasterLeader -n 20

Reviewers: timur, bogdan

Reviewed By: timur

Subscribers: rahuldesirazu, nicolas, skedia, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D12168
  • Loading branch information
spolitov committed Jul 6, 2021
1 parent c99fd9e commit afd8775
Show file tree
Hide file tree
Showing 4 changed files with 417 additions and 356 deletions.
2 changes: 2 additions & 0 deletions src/yb/master/async_rpc_tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ class RetryingTSRpcTask : public MonitoredTask {
std::atomic<MonitoredTaskState> state_{MonitoredTaskState::kWaiting};
};

using RetryingTSRpcTaskPtr = std::shared_ptr<RetryingTSRpcTask>;

// RetryingTSRpcTask subclass which always retries the same tablet server,
// identified by its UUID.
class RetrySpecificTSRpcTask : public RetryingTSRpcTask {
Expand Down
Loading

0 comments on commit afd8775

Please sign in to comment.