-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add binlog filepath uniquification option #10051
Add binlog filepath uniquification option #10051
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for delaying with the PR and proper fix for the opt-in mechanism, the changes looks good.
If the completely opt-in mechanism will be required please let me know, I have some draft changes that could be used as well :)
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I like the design! I feel pretty strongly that we should remove the interface and just use Nothing in this PR should be adding any new public API. Also would be nice if the process ID of the node was featured in the random string. Also let's add a dash between date and time. |
Update format based on suggestions - the sample result is in the updated PR description |
Fixes #8817
Context
There are cases where explicit unique binlog paths cannot be specified and the implicit overwriting behavior is complicating the invectigations (e.g. the implicit separate restore step invoked by sdk - as per #9614).
For those cases let's introduce a simplistic uniquification opt-in mechanism: When specifying a '{}' substring withing the binlog path parameter - this is going to be expanded into a timestamp plus random stamp.
Behavior:
Samples:
-bl:{}
-->20240423-102016--16636--anxG+w.binlog
-bl:LogFile=MyBinlog-{}.binlog
-->MyBinlog-20240423-102016--16636--anxG+w.binlog
-bl:{something}.binlog
-->{something}.binlog
Changes Made
The parameters parsing is extended, so that it can recognize and expand '{}'
Testing
Existing tests. + added tailored tests for pre-existing and new naming interpretation
Notes
This can technically be breaking - but the likelyhood is quite low (I tried to search GH and ADO for usage of binlog, where explicit path would be specified and contained '{}' - and found none). S I'd prefer clean experience rather then adding additional commandline arguments. It is still behind the change wave - if anything goes wrong.
FYI @KirillOsenkov