For creation described situation I did some modifications in "Grocerey Sync" app (release/1.0.0).
App replicates with remote database (pull continuous mode).
In RootViewController I added next code:
- (void)startObserving
{
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(databaseChanged:)
name: kCBLDatabaseChangeNotification
object: self.database];
}
- (void) databaseChanged:(NSNotification*)notification
{
NSArray *changes = [notification.userInfo objectForKey:@"changes"];
NSLog(@"{{{{{{{{{{{{{{{{");
for (CBLDatabaseChange* change in changes) {
NSLog(@"### database changed %@ %@", change.documentID, change.revisionID);
}
NSLog(@"}}}}}}}}}}}}}}}}}}}");
}
I call startObserving in RootViewController viewDidLoad.
After it I speed down my network (using "Network Link Conditioner") and launch demo application in simulator.
So when I did changes with remote database document I got next log lines:
2014-05-19 13:51:47.272 Grocery Sync[74784:60b] SYNC progress: 7 / 8
2014-05-19 13:51:49.446 Grocery Sync[74784:60b] SYNC progress: 7 / 9
2014-05-19 13:51:51.678 Grocery Sync[74784:60b] {{{{{{{{{{{{{{{{
2014-05-19 13:51:51.679 Grocery Sync[74784:60b] ### database changed 4cba3f8ff653d44a67143d578e0006c0 171-3ba229e81babb74ecbe8db110cde1182
2014-05-19 13:51:51.679 Grocery Sync[74784:60b] }}}}}}}}}}}}}}}}}}}
2014-05-19 13:51:51.679 Grocery Sync[74784:60b] SYNC progress: 8 / 9
2014-05-19 13:51:52.084 Grocery Sync[74784:60b] SYNC progress: 8 / 10
2014-05-19 13:51:57.054 Grocery Sync[74784:60b] {{{{{{{{{{{{{{{{
2014-05-19 13:51:57.054 Grocery Sync[74784:60b] ### database changed 4cba3f8ff653d44a67143d578e0006c0 169-0197e21bf0626cb774cedb22bbf2554f
2014-05-19 13:51:57.054 Grocery Sync[74784:60b] }}}}}}}}}}}}}}}}}}}
2014-05-19 13:51:57.054 Grocery Sync[74784:60b] SYNC progress: 9 / 10
2014-05-19 13:51:59.349 Grocery Sync[74784:60b] {{{{{{{{{{{{{{{{
2014-05-19 13:51:59.349 Grocery Sync[74784:60b] ### database changed 4cba3f8ff653d44a67143d578e0006c0 172-b86656f5559090bf39187c624994b94d
2014-05-19 13:51:59.349 Grocery Sync[74784:60b] }}}}}}}}}}}}}}}}}}}
So, document revisions are got in non sequential order: 171, 169, 172. Is it correct behaviour?