In partial-sync consumer gets only those updates that are published after it came online or have just subscribed.
If not for some specific design or security issues, the consumer should get all the updates that were published before its subscription.
Updated by Ashlesh Gawande 8 months ago
- Tracker changed from Task to Bug
- Assignee set to Ashlesh Gawande
- Target version set to v0.3.0
- Start date deleted (
How Consumer::HelloData works:
for /prefix/seq in in helloData: if subscribed to prefix and behind on sequence number: add to updates add /prefix/seq to available subscriptions tell application about available subscriptions [onHelloData callback] tell application about updates [onSyncData callback]
This is so that app when app renews hello interest, Consumer can tell the app only if it has missed some updates while sleeping.
But what is happening here is that Consumer receives the /prefix/seq as part of first hello data and then the app subscribes to it. So consumer has received hello data with the most up to date sequence number correctly. But there is no callback to the app because it was not subscribed to it.
And when the app does call addSubscription, the Consumer class inserts the prefix with a sequence number of zero and not the original sequence number that was received in HelloData. Seems like we would have to modify onHelloData callback to add the sequence number so that app knows about this latest sequence number and can give it to addSubscription.