cloudant / java-cloudant

A Java client for Cloudant
Apache License 2.0
79 stars 68 forks source link

SinceSeq should be a string #526

Closed MPickett1 closed 3 years ago

MPickett1 commented 3 years ago

Bug Description

The Replicator sinceSeq() call takes an Integer but the changes feed needs the entire sequence as a String to function properly.

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

Replicator rep = cloudantClient.replicator()
                    .target(targetUrl + targetDBName)
                    .source(sourceUrl + sourceDBName)
                    .sinceSeq(123)
                    .save();

2. What you expected to happen

The replicator will start at the sequence provided and then continue to the end of the changes feed.

3. What actually happened

The changes reader died.

Environment details

The current version is affected based on the javadocs

This can be remedied by changing the sinceSeq() to use a String instead of an integer and updating the applicable javadocs to explain what needs to be passed.

This was confirmed by manually changing the since_seq option in the replicator document to the entire String of the wanted start point.

bessbd commented 3 years ago

Hi @MPickett1 !

Thank you for reporting this issue! Would you be interested in opening a PR for this?

mojito317 commented 3 years ago

Hi @MPickett1!

With https://github.com/cloudant/java-cloudant/pull/527 merged I closed this issue. The fix will be available in our next release.