-
Notifications
You must be signed in to change notification settings - Fork 283
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
redolog : redolog storage layer data model & common util #2809
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
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.
Go through it!
// InitS3storage init a storage used for s3, | ||
// s3URI should be like s3URI="s3://logbucket/test-changefeed?endpoint=http://$S3_ENDPOINT/" | ||
func InitS3storage(ctx context.Context, s3URI url.URL) (storage.ExternalStorage, error) { | ||
if len(s3URI.Host) == 0 { |
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.
Do we need to check its protocol?
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.
There are still some minor issues, but it looks good. I would suggest aligning the msg annotation name with the json.
rest LGTM. 👍
// fmt.Sprintf("%s_%s_%d_%s_%d%s", w.cfg.captureID, w.cfg.changeFeedID, w.cfg.createTime.Unix(), w.cfg.fileType, w.commitTS.Load(), LogEXT)+SortLogEXT | ||
if ext == SortLogEXT { | ||
name = strings.TrimSuffix(name, SortLogEXT) | ||
ext = filepath.Ext(name) |
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.
This should be the ext of the log file, maybe we could call it logExt for clarity?
} | ||
|
||
// if .sort, the name should be like | ||
// fmt.Sprintf("%s_%s_%d_%s_%d%s", w.cfg.captureID, w.cfg.changeFeedID, w.cfg.createTime.Unix(), w.cfg.fileType, w.commitTS.Load(), LogEXT)+SortLogEXT |
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.
It would be nice to add a real example!
/merge |
This pull request has been accepted and is ready to merge. Commit hash: fa8fcd7
|
/run-kafka-tests |
/run-all-tests |
@ben1009: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-kafka-tests |
What problem does this PR solve?
#2351 redo log based replication to implement eventually consistency
#2685 contains all of the change for the requirement, will split into small ones for review, this is one of the prs, split from the #2685
What is changed and how it works?
this one contains basic data model, common util used in the fellowing PRs
Check List
Tests
Code changes
Side effects
Related changes
Release note