-
Notifications
You must be signed in to change notification settings - Fork 131
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
drainer: Fix #724, Enable drainer to purge old incremental backup data on disk #885
Conversation
338d67e
to
3edf281
Compare
/run-all-tests |
/run-all-tests |
/run-integration-tests |
@july2993 PTAL |
Rest LGTM |
Co-Authored-By: Ian <ArGregoryIan@gmail.com>
Co-Authored-By: Ian <ArGregoryIan@gmail.com>
} | ||
|
||
// NewPBSyncer sync binlog to files | ||
func NewPBSyncer(dir string, tableInfoGetter translator.TableInfoGetter) (*pbSyncer, error) { | ||
func NewPBSyncer(dir string, retentionDays int, tableInfoGetter translator.TableInfoGetter) (*pbSyncer, error) { |
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.
exported func NewPBSyncer returns unexported type *sync.pbSyncer, which can be annoying to use
} | ||
|
||
// NewPBSyncer sync binlog to files | ||
func NewPBSyncer(dir string, tableInfoGetter translator.TableInfoGetter) (*pbSyncer, error) { | ||
func NewPBSyncer(dir string, retentionDays int, tableInfoGetter translator.TableInfoGetter) (*pbSyncer, error) { |
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.
exported func NewPBSyncer returns unexported type *sync.pbSyncer, which can be annoying to use
/run-all-tests |
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.
LGTM
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.
LGTM! Thanks :)
Sorry for the late response - was getting bombarded with PR reviews these days...
cherry pick to release-3.0 failed |
cherry pick to release-3.1 failed |
What problem does this PR solve?
Enable drainer to purge old incremental backup data on disk.
What is changed and how it works?
retention-time
config to specify how long binlog files should be kept in drainer. Backward-compatibility is maintained by treating non-positive values ofretention-time
as no GC.retention-time
is of typeint
, which is consistent with the pumpGC
configuration. We may later introducep8s
style time format for bothGC
andretention-time
and use days as the default unit to maintain backward-compatibility.Check List
Tests
Code changes
Has exported function/method change
The
GC
method is changed to two new methodsGCByTIme
andGCByPos
.Related changes