Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do region flush in Region::handleWriteRaftCmd (#542) #551

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

sre-bot
Copy link
Collaborator

@sre-bot sre-bot commented Mar 23, 2020

cherry-pick #542 to release-3.1


  • Move region flush logic into Region::handleWriteRaftCmd, so that it be protected by Region::mutex and Region::predecode_mutex
  • Remove remove flushed data logic into RegionTable::writeBlockByRegion from RegionTable:: flushRegion, so that writeBlockByRegion can be called directly from Region::handleWriteRaftCmd. Note that we don't call flushRegion directly because we try to avoid getting instance of RegionTable, some unnecessary check and print log. As Region::handleWriteRaftCmd is very performance critical.

@JaySon-Huang
Copy link
Contributor

/run-integration-tests

Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

lgtm

@JaySon-Huang JaySon-Huang merged commit 31af81e into pingcap:release-3.1 Mar 24, 2020
@JaySon-Huang JaySon-Huang deleted the release-3.1-1287459327b9 branch March 24, 2020 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHERRY-PICK cherry pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants