Only start SQL thread temporarily to WaitForPosition if needed#10103
Closed
Only start SQL thread temporarily to WaitForPosition if needed#10103
Conversation
It will then be stopped again after we've reached the desired position. This was the table repair will function normally and start replication again if it's a replica table and the IO and SQL threads are stopped. Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Member
Author
|
Moved here: #10104 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It #9512 we blindly attempted to start the replication
SQL_Thread(s) when waiting for a given replication position. The problem with this, however, is that if theSQL_Threadis running but theIO_Threadis not then the tablet repair does not try and start replication on a replica tablet. So in certain states such as when initializing a shard, replication may end up in a non-healthy state and never be repaired.This changes the behavior so that:
SQL_Threadif it's not already healthySTART SLAVE SQL_THREAD UNTIL SQL_AFTER_GTIDSinstead ofSTART SLAVE SQL_THREADso that the SQL_Thread will be stopped once we reach the desired position. This will allow the tablet repair to repair the replica when needed.Related Issue(s)
Checklist