Skip to content

Add acknowledgment checkpointing with fixes to previous issues#6002

Merged
graytaylor0 merged 4 commits intoopensearch-project:mainfrom
graytaylor0:DdbFix
Aug 19, 2025
Merged

Add acknowledgment checkpointing with fixes to previous issues#6002
graytaylor0 merged 4 commits intoopensearch-project:mainfrom
graytaylor0:DdbFix

Conversation

@graytaylor0
Copy link
Copy Markdown
Member

@graytaylor0 graytaylor0 commented Aug 18, 2025

Description

This change reverts a previous commit that removed the changes to checkpoint acknowledgments for streams in the dynamodb source. It then adds some changes that locally have fixed the issues that were seen during acknowledgment checkpointing with data loss and acknowledgment timeouts

Issues Resolved

Resolves #4764

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ing acknowledgments

Signed-off-by: Taylor Gray <tylgry@amazon.com>
Copy link
Copy Markdown
Contributor

@JonahCalvo JonahCalvo left a comment

Choose a reason for hiding this comment

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

Great, thanks for helping me out with this new feature!

return sequenceNumber;
}

public boolean isPositiveAcknowledgement() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add unit tests for these methods with logic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do

.shardId(shardId)
.streamArn(streamArn)
.shardIteratorType(ShardIteratorType.AT_SEQUENCE_NUMBER)
.shardIteratorType(ShardIteratorType.AFTER_SEQUENCE_NUMBER)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be verified in the unit test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will add

// Verify that saveProgressStateForPartition is called
verify(sourceCoordinator).saveProgressStateForPartition(eq(streamPartition), any(Duration.class));
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This class looks like it could use more test cases.

Signed-off-by: Taylor Gray <tylgry@amazon.com>
dlvenable
dlvenable previously approved these changes Aug 19, 2025
Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Taylor Gray <tylgry@amazon.com>
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
StreamPartition that = (StreamPartition) o;
return Objects.equals(shardId, that.shardId);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shardIds across different Stream-ARNs will be different? Just making sure shardIds won't get repeated

Copy link
Copy Markdown
Member Author

@graytaylor0 graytaylor0 Aug 19, 2025

Choose a reason for hiding this comment

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

They should be unique, but we will evaluate if we ever enable support for more than one table in the future.

@graytaylor0 graytaylor0 merged commit 2c66d59 into opensearch-project:main Aug 19, 2025
44 of 47 checks passed
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.

Checkpoint acknowledgments for DynamoDB pipelines

4 participants