-
Notifications
You must be signed in to change notification settings - Fork 156
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
[Enhancement] Support restore/rollback sync during conversion (1/2) #569
base: main
Are you sure you want to change the base?
Changes from 14 commits
e0a8710
9bc8256
76e0bc0
45b279a
8ac5717
53a58b6
bb5ed78
9b8b71e
252ca2c
d9cb5fd
c8dde9e
bfbb78f
002d91b
bf5f0a0
56fe85e
a40cd6c
1e39d1a
0af0a82
82b2d2d
7ffda25
4198e5b
b181a07
4ca9c9a
9552679
5fe489e
42c804b
e470e98
2033c3a
edb99fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,9 @@ public interface ConversionTarget { | |
* Starts the sync and performs any initialization required | ||
* | ||
* @param table the table that will be synced | ||
* @param sourceIdentifier | ||
*/ | ||
void beginSync(InternalTable table); | ||
void beginSync(InternalTable table, String sourceIdentifier); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wondering if it makes sense to attach the source format as part of the identifier. Then we can also have some metadata about what the writer format was. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good idea. I create a |
||
|
||
/** Completes the sync and performs any cleanup required. */ | ||
void completeSync(); | ||
|
@@ -90,4 +91,7 @@ public interface ConversionTarget { | |
|
||
/** Initializes the client with provided configuration */ | ||
void init(TargetTable targetTable, Configuration configuration); | ||
|
||
/** Return the commit identifier from target table */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you be more specific here? I am assuming this is the latest commit identifier but it should be more specific if the table can have more than one over time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Do you mean the snapshot sync scenario? Because In incremental sync, we will ensure target and source commit has 1:1 mapping. However, in snapshot sync, we will use the commit id of current (latest) snapshot even though the changes might contains more than one commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To ensure we’re aligned, the context of this function is: It is designed to retrieve the corresponding target commit based on a given source identifier during a sync operation. Here’s the scenario: Assume:
Source table commit history: When syncing the ROLLBACK operation (source commit 4), we need to identify the corresponding target commit that aligns with the source identifier 2 (which is 1 in target). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense to me but the java doc can be a bit more clear. It should also include context on when the Optional will be empty |
||
Optional<String> getTargetCommitIdentifier(String sourceIdentifier); | ||
} |
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.
You can use
<ul><li>
tags for formatting the docs with the list if you want