Refresh MySQL config after a backup#3063
Conversation
|
This LGTM but we should probably also do on Restore? |
|
Good call. Just dig into it and found that in that context it's calling ReinitConfig(), so I think it should be good. However, now I'm not sure if I should call here ReinitConfig as well. When I was looking into this, both should work, but RefreshConfig seemed like a better fit. What do you think? |
|
Ah I forgot. That's actually where I got the inspiration for RefreshConfig. Let me take a look. |
|
I think we should stick with RefreshConfig. ReinitConfig exists so that it can additionally change the mysql serverId to avoid skipping transaction after a restore. In the case of taking a backup I think we want to keep the same serverId when it comes back up. So we can leave Backup alone. |
|
Test failures seem related to this change |
|
@bbeaudreault - yeah looking into that right now. |
6030347 to
709b81b
Compare
* Refresh MySQL config after a backup
* Tweaks to test set up, to make sure tablet has correct
values for extra_env
709b81b to
cdd759c
Compare
|
@bbeaudreault - I think it should be good now. Fixed the test ! |
|
LGTM. cc @sougou |
|
While deploying this change to prod, we discovered an issue with this change. If you are using the following flag when starting mysqlctld: I believe the reason is in this line. Function Besides documentation, I don't see any workaround for this problem. @bbeaudreault, @sougou thoughts? |
|
I feel like this needs to be fixed by a higher level design change. Until then, I'm ok with documenting it. |
|
I also ran into this. I think possibly what should happen is mysqlctld should refresh the config before starting mysql, rather than vttablet refreshing the config before calling mysqlctld. I havent had a chance to look at the code yet to see how hard that is. If it's too complicated or doesnt work as I think then documenting is fine for now. |
* Currently this is not having the intended behavior. Removing while adding a proper fix for this. This effectively reverts: vitessio#3063 Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Description
Tests