14:08:54.886| Logging mode 2 enabled in domains: {Sync}14:08:54.926| Sync: ReplicatorManager: Validating CBLRevision[4CEA..7BE7/]: {continuous = 1;source = "http://10.200.40.135:3984/g3/";target = local;}14:08:54.928| Sync: ReplicatorManager: {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #1-4d6a76cb9854ffc1b06633df82493d81} was created14:08:54.928| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STARTING ...14:08:54.928| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:08:54.929| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:08:54.929| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Going online14:08:54.929| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.929| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.929| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #1-4d6a76cb9854ffc1b06633df82493d81} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";"_replication_state" = triggered;"_replication_state_time" = 1369076934;}14:08:54.931| Sync: ReplicatorManager: Validating CBLRevision[500B..8895/]: {continuous = 1;source = local;target = "http://10.200.40.135:3984/g3/";}14:08:54.932| Sync: ReplicatorManager: {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #1-9c3c66f3974c95c53660f5c65923cec6} was created14:08:54.932| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STARTING ...14:08:54.932| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:08:54.932| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:08:54.932| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Going online14:08:54.933| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.933| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.933| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #1-9c3c66f3974c95c53660f5c65923cec6} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";"_replication_state" = triggered;"_replication_state_time" = 1369076934;}14:08:54.946| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #2-a89e2dd777abeec30d47bd72dafe01bd} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:08:54.946| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #2-d8ffabd0b123689c316dd75d4b7978f0} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:08:54.960| Sync: ReplicatorManager: Validating CBLRevision[500B..8895/]: {"_id" = "500B5867-25B3-43CF-8AD4-9EB3ED0C8895";"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";"_replication_state_time" = 1369076934;"_rev" = "2-d8ffabd0b123689c316dd75d4b7978f0";continuous = 1;filter = "mobile/filterOutLocalDocuments";source = local;target = "http://10.200.40.135:3984/g3/";}14:08:54.962| Sync: ReplicatorManager: Restarting replicator for {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #3-ba972e532b004291412ec2cda492a569}14:08:54.962| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STOPPING...14:08:54.962| Sync: Stopping 1 remote requests14:08:54.965| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Error fetching last sequence: The operation couldn’t be completed. (NSURLErrorDomain error -999.)14:08:54.969| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.969| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STOPPED14:08:54.969| Replication: CBL_Pusher[http://10.200.40.135:3984/g3/] took 0.037 sec; error=(null)14:08:54.969| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.969| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.970| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #3-ba972e532b004291412ec2cda492a569} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";"_replication_state" = completed;"_replication_state_time" = 1369076934;}14:08:54.971| Sync: ReplicatorManager: {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #3-ba972e532b004291412ec2cda492a569} was created14:08:54.971| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STARTING ...14:08:54.971| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:08:54.972| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:08:54.972| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Going online14:08:54.972| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.973| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.973| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #3-ba972e532b004291412ec2cda492a569} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";"_replication_state" = triggered;"_replication_state_time" = 1369076934;}14:08:54.976| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)14:08:54.979| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)14:08:54.985| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.986| Sync: ReplicatorManager: Validating CBLRevision[4CEA..7BE7/]: {"_id" = "4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7";"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";"_replication_state_time" = 1369076934;"_rev" = "2-a89e2dd777abeec30d47bd72dafe01bd";continuous = 1;source = "http://10.200.40.135:3984/g3/";target = local;}14:08:54.987| Sync: ReplicatorManager: Restarting replicator for {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #3-570fadae334a491abf0eae70998e8826}14:08:54.988| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.988| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STOPPING...14:08:54.988| Sync: Stopping 0 remote requests14:08:54.988| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STOPPED14:08:54.988| Replication: CBL_Puller[http://10.200.40.135:3984/g3/] took 0.060 sec; error=(null)14:08:54.988| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.988| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:08:54.989| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #3-570fadae334a491abf0eae70998e8826} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";"_replication_state" = completed;"_replication_state_time" = 1369076934;}14:08:54.990| Sync: ReplicatorManager: {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #3-570fadae334a491abf0eae70998e8826} was created14:08:54.991| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STARTING ...14:08:54.991| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:08:54.992| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:08:54.992| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Going online14:08:54.992| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.992| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:08:54.992| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #3-570fadae334a491abf0eae70998e8826} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";"_replication_state" = triggered;"_replication_state_time" = 1369076934;}14:08:54.995| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:08:54.996| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:08:55.002| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)14:08:55.297| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Received 24 changes14:08:55.297| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/24, active=1 (batch=24, net=1), online=1)14:08:55.297| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Caught up with changes!14:08:55.298| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:08:55.798| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] queued 24 remote revisions from seq=1 (24 in bulk, 0 individually)14:08:55.798| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] bulk-fetching 24 remote revisions...14:08:55.812| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] checking 24 bulk-fetched remote revisions14:08:56.821| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] inserted 24 revs in 0.009 sec (2774.2/sec)14:08:56.821| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/24, active=0 (batch=0, net=0), online=1)14:08:56.821| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (24/24, active=0 (batch=0, net=0), online=1)14:08:56.822| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:09:01.819| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] checkpointing sequence=242013-05-20 14:10:14.035 MyApp[94340:9903] filter for assignment B65B6BFA-991C-41B6-96A6-41F5D5AED69A include? YES14:10:14.035‖ Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=1, net=0), online=1)2013-05-20 14:10:14.354 MyApp[94340:9903] filter for user bobbih include? YES
14:13:17.444| Logging mode 2 enabled in domains: {Sync}14:13:17.446| Sync: ReplicatorManager scanning existing _replicator docs...14:13:17.447| Sync: ReplicatorManager: {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} was created14:13:17.448| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STARTING ...14:13:17.449| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:13:17.544| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:13:17.544| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Going online14:13:17.544| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:13:17.546| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:13:17.546| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:13:17.546| Sync: ReplicatorManager: {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} was created14:13:17.546| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STARTING ...14:13:17.546| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>14:13:17.546| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)14:13:17.546| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Going online14:13:17.547| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:13:17.547| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:13:17.547| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:13:17.547| Sync: ReplicatorManager done scanning.14:13:17.564| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:13:17.565| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:13:17.586| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)14:13:17.597| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=2414:13:17.600| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Received 0 changes14:13:17.600| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)14:13:17.600| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Caught up with changes!14:13:17.600| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)14:13:17.601| Sync: ReplicatorManager: Updating {4CEA5CD3-373A-4E5C-A7F2-CC7A2CF37BE7 #5-53d073266772d1c7489e1b268c1b3b27} with {"_replication_id" = "E7E47B9A-03C3-4C20-B867-74B77806A40A";}14:13:17.623| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Sending 2 revisions14:13:17.623| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/2, active=1 (batch=0, net=1), online=1)14:13:17.624| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:13:17.630| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (2/2, active=1 (batch=0, net=1), online=1)14:13:17.631| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (2/2, active=0 (batch=0, net=0), online=1)14:13:17.631| Sync: ReplicatorManager: Updating {500B5867-25B3-43CF-8AD4-9EB3ED0C8895 #5-529316dc41e5e1a612efad4c1fae2f49} with {"_replication_id" = "0332FDAF-38FC-4525-9672-6D14E5F59878";}14:13:22.620| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] checkpointing sequence=30
self.replications = [self.database replicateWithURL:remoteDatabaseURL exclusively:YES];
for (CBLReplication *replication in self.replications) {
replication.continuous = YES;
replication.persistent = YES;
}
[self.replications[0] addObserver:self forKeyPath:kCompletedKeyPath options:0 context:NULL];
[self.replications[1] addObserver:self forKeyPath:kCompletedKeyPath options:0 context:NULL];
[self defineViews];
NSString *filterName = [NSString stringWithFormat:@"%@/%@", kMobileDesignDocumentName, kFilterOutLocalDocuments];
[self.database defineFilter:filterName asBlock:^BOOL(CBLRevision *revision, NSDictionary *params) {
NSNumber *localOnly = [revision.properties objectForKey:kLocalOnly];
BOOL include = !localOnly.boolValue;
NSLog(@"filter for %@ %@ include? %@", revision.properties[@"type"], revision.properties[@"_id"], include ? @"YES" : @"NO");
return include;
}];
((CBLReplication *)self.replications[1]).filter = filterName;
07:51:23.713| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STARTING ...
07:51:23.714| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>
07:51:23.714| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)
07:51:23.714| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Going online
07:51:23.715| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)
07:51:23.715| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)
07:51:23.716| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STARTING ...
07:51:23.716| CBLBasicAuthorizer initWith <http://10.200.40.135:3984/g3/>
07:51:23.716| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Reachability state = <10.200.40.135>:reachable (02)
07:51:23.716| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Going online
07:51:23.717| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)
07:51:23.717| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1)
07:51:23.727| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)
07:51:23.728| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)
07:51:23.728| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/] STOPPED
07:51:23.728| Replication: CBL_Pusher[http://10.200.40.135:3984/g3/] took 0.012 sec; error=(null)
07:51:23.728| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)
07:51:23.728| Sync: CBL_Pusher[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)
07:51:23.731| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Replicating from lastSequence=(null)
07:51:24.003| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Received 24 changes
07:51:24.004| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/24, active=1 (batch=24, net=2), online=1)
07:51:24.004| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: Caught up with changes!
07:51:24.004| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: ChangeTracker stopped; error=(null)
07:51:24.005| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] queued 24 remote revisions from seq=1 (24 in bulk, 0 individually)
07:51:24.005| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] bulk-fetching 24 remote revisions...
07:51:24.018| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] checking 24 bulk-fetched remote revisions
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] inserted 24 revs in 0.009 sec (2807.0/sec)
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/24, active=0 (batch=0, net=0), online=1)
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] STOPPED
07:51:25.027| Replication: CBL_Puller[http://10.200.40.135:3984/g3/] took 1.313 sec; error=(null)
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (0/0, active=0 (batch=0, net=0), online=1)
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/] checkpointing sequence=24
07:51:25.027| Sync: CBL_Puller[http://10.200.40.135:3984/g3/]: postProgressChanged (24/0, active=0 (batch=0, net=0), online=1)
for (CBLReplication *replication in self.replications) {
replication.continuous = YES;
replication.persistent = YES;
}
((CBLReplication *)self.replications[1]).filter = filterName;
Looking at CouchChat, it looks like the replication restarts each time it's change. In CouchChat, the pusher is restarted twice:
The quoted lines are unnecessary except for when the replication is first configured; since the replications are persistent, they keep their settings from one launch to the next. The only reason you need to call -replicateWithURL: is to get pointers to the replication objects so you can observe their status.
Have you tried ‘SyncVerbose’ logging?
Sorry if I wasn't clear, but the code and logs I posted are from the first launch only. Different code is executed on subsequent launches. I'm running in the simulator and am resetting it between runs.
Oh, OK. And the behavior is that on this first launch after reset, the push fails, whereas on any subsequent launch it succeeds.
(If so, what data is there to push on the first launch, before the user’s edited anything? Does the app itself create some data like a user profile?)
Once launched, the app allows the user to create assignments for other users. This causes an assignment document to be created and the assignee's user document to be updated. With SyncVerbose on, I see additional messages that indicate both documents are queued. But they aren't transmitted until I kill and restart the app.
If the message “Queuing #…” is logged, then there should soon (within 0.5 sec) be a message "*** %@: BEGIN processInbox (%u sequences)”, signaling the callback where the queued revisions get processed (sent). If not, something’s wrong with the CBLBatcher class…
Let me know if this doesn’t clear up your initial problem.
FYI, in general you shouldn’t treat any Objective-C API as being thread-safe unless it’s documented as being so. Even lots of core classes like mutable containers aren’t thread-safe, for example.