-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: change cloudant.since
logic to prefer saved offset, if present
#125
Conversation
This was preventing the connector from resuming properly on restarts. If the last sequence number is not present in offset storage, _then_ 0 will be used. Tested manually be restarting and observing log message and lack of event duplication. fixes #124
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.
The change seems fine, but I wonder if we should do three additional things here, namely:
- Update
CloudantLastSeqNumDoc = Last update sequence identifier to resume from. \ "0"
I think). - Regenerate the config doc since the default is now different (and to include above update).
- Add a test so we don't accidentally regress this at some point.
|
- Prefer value from offset storage if present - Clarify docs
9e9d9d4
to
47d1533
Compare
cloudant.since
to 0cloudant.since
logic to prefer saved offset, if present
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.
+1, small nit
Co-authored-by: Rich Ellis <ricellis@users.noreply.github.com>
also remove redundant constant `DEFAULT_CLOUDANT_LAST_SEQ`
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.
+1 a couple of nits on copy/paste test comments
src/test/java/com/ibm/cloud/cloudant/kafka/tasks/SinceOptionTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/ibm/cloud/cloudant/kafka/tasks/SinceOptionTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Rich Ellis <ricellis@users.noreply.github.com>
thanks @ricellis for spotting those copy/pastes |
fixes #124