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

Reduce pressure for asking gc safe point from PD #302

Closed

Conversation

JaySon-Huang
Copy link
Contributor

Each time a TxnMergeTree merge task starts, it will ask PD for gc safe point. If there are hundreds of tables of TxnMergeTree, it may cause PD busy.

Add cached for gc safe point to reduce the num of request to PD.

@JaySon-Huang JaySon-Huang requested a review from solotzg October 30, 2019 09:10
@solotzg
Copy link
Contributor

solotzg commented Oct 31, 2019

We can not control our own gc safe point, because the region will be send to flash by snapshot, which might have already been gc by newest safe point.

@JaySon-Huang
Copy link
Contributor Author

@solotzg
Do you mean while doing applySnapshot, we should get safe point without cached? If so, I will change it later.

But I still think that while doing merge in TxnMergeTree, we should get safe point with cached, or PD may get busy if there are hundreds of tables in TiFlash. Do you agree?

@JaySon-Huang
Copy link
Contributor Author

We will only get safe point with cached in Engine DeltaMerge, close this PR.

@JaySon-Huang JaySon-Huang deleted the gc-safe-point-cache branch September 27, 2020 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants