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

[#148] Modifications to add, poll and peek in Merger #150

Merged
merged 16 commits into from
Feb 15, 2023

Conversation

vaibhav-yb
Copy link
Collaborator

@vaibhav-yb vaibhav-yb commented Feb 7, 2023

This diff adds the following modifications to the above mentioned functions:

  1. add() now updates the tablet safetime on adding every message
  2. peek() now returns a message if the commit time of the front message is less than or equal to the stream safetime.
  3. Asserts to detect any state which may lead to inconsistency, such asserts would throw an AssertionError and will cause the connector to stop now.
  4. Unit tests for the added functions.

@vaibhav-yb vaibhav-yb changed the base branch from main to cdc_consistency February 7, 2023 08:29
Copy link
Contributor

@vrajat vrajat left a comment

Choose a reason for hiding this comment

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

Will there be a new PR for asserts?

@vaibhav-yb
Copy link
Collaborator Author

vaibhav-yb commented Feb 8, 2023

Will there be a new PR for asserts?

Yes @vrajat There will be a separate PR for asserts and dumps as it requires me to merge all three of the existing changes first since asserts cover Merger and Messages both.

It is now added as a part of the same PR.

Copy link
Contributor

@vrajat vrajat left a comment

Choose a reason for hiding this comment

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

For testing asserts, it should be sufficient to add two messages out of order in the same tablet? That should fire the assert (that you may add) in setTabletSafeTime.

Two messages that have the same commitTime but out of order like COMMIT followed by BEGIN should trigger the other assert in add.

@vaibhav-yb vaibhav-yb self-assigned this Feb 14, 2023
Copy link
Contributor

@vrajat vrajat left a comment

Choose a reason for hiding this comment

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

Couple of minor comments. Ack on taking up the config parameter in a different PR

@vaibhav-yb vaibhav-yb merged commit 4b17414 into yugabyte:cdc_consistency Feb 15, 2023
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