-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[proposal] use SQL to manage the TiDB-Binlog toolset #9201
Comments
On (4), MySQL does not support May I recommend either: There are security issues with letting a user disable binlogging for their session too. Since the toolchain supports filtering downstream, we could maybe also propose that the For commands (7) and (8) these don't quite feel natural to me (it's not namespaced). Maybe it could be modeled on the syntax for replication channels in MySQL 5.7+? |
thanks for your suggestions, I will take a look and update this proposal. @morgo |
I perfer the |
I think the global scope is necessary for tidb_binlog, and we can also support the session and server scope. we need set some limit to avoid some error, for example ddl must generate binlog in all scope type, and we need notice user must be very careful when change the tidb_binlog's scope. @morgo @GregoryIan |
hi morgo, could you please provide a example of sql for update pump's state. we have several pumps, every pump have a unique nodeID, and the nodeID is set by user. @morgo |
|
some user want ignore generate binlog in load stage @GregoryIan |
@WangXiangUSTC I will get back to you with example syntax early next week. I want to run it by some users at FOSDEM. In regards to if |
@morgo thanks |
Okay, I have the following feedback:
(If you want to implement per-session at a later point in time, that's fine too.) |
|
I am slowly trying to fix variables so they no longer show dummy data (it creates issues for users who are trying to debug problems). So we would need to at least alias
Sounds good. |
thanks for your suggestion, I already updated this proposal @morgo |
i want to implements the frist one int todo list. |
I want to impl the 3rd one in todo list.
|
@aliiohs @yangwenmai thanks |
I'd like to implement the 2nd one.
|
@caohe thanks |
I want to impl the 5rd one in todo list. |
I'd like to impl the 4th: |
One more feature request: For any |
I showed this to a MySQL user today, and they suggested that this command is not MySQL-like:
It should be modeled on stop slave:
|
@WangXiangUSTC can this issue be closed? |
@nullnotnil OK |
Feature Request
Support some SQLs to manage the TiDB-Binlog toolset.
Background
Now we don't know whether a TiDB instance enable the binlog, we need check the TiDB's config file, or look the config information in TiDB's log. It is inconvenience.
We must restart the TiDB instance if we need enable or close the TiDB's binlog, it is inconvenience too.
If we want check the pump and drainer's status, we need use another tool
binlogctl
, and the command ofbinlogctl
is complicated, not easy to use.Feature
View status of binlog and TiDB-Binlog toolset
1. Check binlog is enable or not
Add a variable named
log_bin
, just same with MySQL.2. View Pump's status
Support SQL
show pump status
3. View Drainer's status
Support SQL
show drainer status
Manage binlog and TiDB-Binlog toolset
4. Close binlog
Add a new variable
log_bin
, if set this value to 0, will close the binlog. The scope can be global, server or session.5. Enable binlog
Use the variable above, set this value to 1 to enable binlog.
6. Change the write binlog's strategy in pump client
Add a new variable named
binlog_strategy
, the value can berange
,hash
and so on.The scope can be global to server.
7. Update Pump's state
Add SQL looks like below:
8. Update Drainer's state
Add SQL looks like below:
TODO List
1. Support variable
log_bin
2. Support SQL
show pump status
andshow drainer status
just like
binlogctl
, get pump and drainer status in PD, reference: binlogctl3. Support close or enable binlog by set log_bin
4. Support change the write binlog's strategy in pump client
pump client's code reference: pump client
5. Support update Pump or Drainer's status
just like
binlogctl
, if Pump or Drainer is alive, send http request to Pump/Drainer, otherwise update the status saved in PD directly.The text was updated successfully, but these errors were encountered: