Skip to content
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

[FLINK-36523][Connectors/DynamoDB][BugFix] Fixing LATEST behaviour for DDB Connector #177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gguptp
Copy link
Contributor

@gguptp gguptp commented Oct 13, 2024

Purpose of the change

Fixing latest behaviour for DDB Connector.

Verifying this change

Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing

(Please pick either of the following options)
Added new unit tests

Significant changes

(Please check any boxes [x] if the answer is "yes". You can first publish the PR and check them afterwards, for convenience.)

  • Dependencies have been added or upgraded
  • Public API has been changed (Public API is any class annotated with @Public(Evolving))
  • Serializers have been changed
  • New feature has been introduced
    • If yes, how is this documented? (not applicable / docs / JavaDocs / not documented)

Comment on lines 106 to 111
* also, all the ancestors will not be tracked and rather only the current open shard will be
* tracked with LATEST.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. When restoring from snapshot, we should read all records since the restored snapshot (TRIM_HORIZON), and not LATEST.

Copy link
Contributor

@hlteoh37 hlteoh37 Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should align that the expected behavior, when using LATEST, should be:

  1. When starting without snapshot:
    • All shards from start of application read from LATEST. If we want, we can focus on just the open shards.
    • All child shards are read from TRIM_HORIZON
  2. When reading with snapshot:
    • All shards from time of start of application are read from TRIM_HORIZON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants