VReplication: use db_filtered user for vstreams#10080
Merged
mattlord merged 5 commits intovitessio:mainfrom Apr 20, 2022
Merged
VReplication: use db_filtered user for vstreams#10080mattlord merged 5 commits intovitessio:mainfrom
mattlord merged 5 commits intovitessio:mainfrom
Conversation
fd3cf07 to
e50c970
Compare
579b889 to
f1774d6
Compare
81eee77 to
999bd11
Compare
75ca067 to
1312af6
Compare
1877058 to
bbdb16a
Compare
Member
Author
I increased the scope a bit to use the
That's why I requested a re-review. Sorry. It was a long round about adventure to find out why the PITR recovery tests (which use rippled) were failing (dbconfig parts of bbdb16a). |
ce06996 to
8eb2d8f
Compare
3 tasks
Member
Author
|
@derekperkins please let me know if you have any messaging related questions or concerns. Thanks! |
8eb2d8f to
fd090a2
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
This way vreplication is using the same user on the source (streamer) and target (player). Signed-off-by: Matt Lord <mattalord@gmail.com>
And set the filtered user config in the binlog server streamer and the tabletmanager restore. Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
fd090a2 to
f25b649
Compare
3 tasks
This was referenced Jul 21, 2022
Merged
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
When performing VReplication workflows — such as
MoveTables— we need to stream table rows, query results, and binary log events from the source in order to copy data and changes to the target.The
com_binlog_dump_gtidcommand is used on the source side in order to stream the binary log events (vstreamer->binlog streamer) from the source tablet's mysqld to the vttablet for filtering before sending to the target vttablets (vcopier->vplayer). In order to execute this command the user needs theREPLICATION SLAVEprivilege.A big issue this PR addresses is that the
db_appuser was used for this. Not only is this unexpected (non-intuitive and not documented), but it requires that the application user has replication privileges which is not the norm. In this PR we:db_filtereduser — which already has theREPLICATION SLAVEprivilege — for streaming the binlog events (binlog streamer)SHOW BINARY LOGSexecuted in related connection/code that require theREPLICATION CLIENTprivilege, whichdb_filteredalready hasdb_filtereduser for all other base vstream types: row streamer and results streamerREPLICATION SLAVEprivilege from the defaultdb_appusermake embed_configwhich itself was broken), including this change and the recent super_read_only change (see related issue below)Related Issue(s)
Checklist