Skip to content

[IOTDB-1317] Log CatchUp always failed du to not check the follower's match index#3029

Merged
mychaow merged 2 commits intoapache:masterfrom
neuyilan:apache_master_IOTDB-1317
Apr 20, 2021
Merged

[IOTDB-1317] Log CatchUp always failed du to not check the follower's match index#3029
mychaow merged 2 commits intoapache:masterfrom
neuyilan:apache_master_IOTDB-1317

Conversation

@neuyilan
Copy link
Copy Markdown
Member

https://issues.apache.org/jira/browse/IOTDB-1317

When the follower lags behind the leader, it will catch up with the leader through the log. When it can't find the logs to catch up with in the memory of the leader, it will go to the file on the local disk to find the satisfied logs. The logs found are between the old match index and the commit index saved by the leader. However, at this time, the match index of the follower may have been updated and the old match index of the follower may have been deleted (in order to prevent a large number of logs from being kept on disk, there is a log deletion mechanism). So at this time, if you send the above logs to the follower, the follower will fail to find the matching log. At this time, this storage group will appear to write stuck phenomenon.

The solution is to re-check the match index of the follower after reading the log from the disk.

@neuyilan neuyilan changed the title [IOTDB-1317]fix the bug that Log CatchUp always failed du to not check the follow… [IOTDB-1317] Log CatchUp always failed du to not check the follower's match index Apr 19, 2021
@neuyilan neuyilan added bug Something isn't working Module - Cluster PRs for the cluster module labels Apr 19, 2021
Copy link
Copy Markdown
Member

@mychaow mychaow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neuyilan neuyilan marked this pull request as draft April 20, 2021 02:07
@neuyilan neuyilan marked this pull request as ready for review April 20, 2021 02:27
Copy link
Copy Markdown
Member

@wangchao316 wangchao316 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mychaow mychaow merged commit 7be35d6 into apache:master Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Module - Cluster PRs for the cluster module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants