danielhumanmod commented on code in PR #569:
URL: https://github.com/apache/incubator-xtable/pull/569#discussion_r1868715158
##########
xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java:
##########
@@ -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 */
Review Comment:
> 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.
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.
##########
xtable-api/src/main/java/org/apache/xtable/spi/sync/ConversionTarget.java:
##########
@@ -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 */
Review Comment:
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:
- Last completed sync (1 snapshot, 1 incremental) is source commit 3
- We’re starting the new sync process from source commit 4
Source table commit history:
• 1 (UPDATE)
• 2 (UPDATE)
• 3 (UPDATE)
• 4 (ROLLBACK to 2)
• 5 (UPDATE)
• 6 (UPDATE)
Target table commit history (mapped by source identifiers):
• 1 (mapped to source id 2)
• 2 (mapped to source id 3)
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).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]