Replication completed?

106 views
Skip to first unread message

dyowee

unread,
Nov 11, 2012, 4:51:41 PM11/11/12
to mobile-c...@googlegroups.com
Good day sir Jens,
 
In my app, I'm checking for the 'running' flag if the replication that the user has initiated (showing a 'Please wait...' message box) is done already. But I have an issue when the user goes back to the iPad main screen if the sync is taking a while. It seems to set the 'running' flag to false when the user does this. Am I right on this?
 
Regards,
Joey

Jens Alfke

unread,
Nov 12, 2012, 12:42:14 PM11/12/12
to mobile-c...@googlegroups.com

On Nov 11, 2012, at 1:51 PM, dyowee <csharpen...@gmail.com> wrote:

In my app, I'm checking for the 'running' flag if the replication that the user has initiated (showing a 'Please wait...' message box) is done already. But I have an issue when the user goes back to the iPad main screen if the sync is taking a while. It seems to set the 'running' flag to false when the user does this. Am I right on this?

Yes, deactivating the app stops replications. Otherwise the OS would kill the app process if it kept making network connections while in the background.

—Jens

dyowee

unread,
Nov 12, 2012, 6:14:06 PM11/12/12
to mobile-c...@googlegroups.com
THank you sir. Is there another way to tell otherwise that is successfully completed?

Tobin Harris

unread,
Nov 12, 2012, 7:36:35 PM11/12/12
to mobile-c...@googlegroups.com
Another one on this topic, my replication gets a bit stuck

2012-11-13 00:34:56.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

2012-11-13 00:34:59.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:02.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:05.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:08.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:11.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:14.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

2012-11-13 00:35:17.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

2012-11-13 00:35:20.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:23.423 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:26.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:29.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:32.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:35.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

2012-11-13 00:35:38.422 entrygenius-ios[14305:707] Idle, 1

This means I never know when we're done. How do I find out what it's stuck on?

Tobin

dyowee

unread,
Nov 12, 2012, 7:57:24 PM11/12/12
to mobile-c...@googlegroups.com
Are you replicating against Cloudant? I'm getting some issues too for the past couple of days. :(

dyowee

unread,
Nov 12, 2012, 8:34:59 PM11/12/12
to mobile-c...@googlegroups.com
There seems to be a weird issue with Cloudant. I am replicating with a read/write access, and it has been getting stuck with replication for a few days now. So what I did is make the user 'admin', just to test. And the problem when away. Replication seems to work ok and fast. Is this a Cloudant issue or TouchDB?
 
Regards,
Joey

Jens Alfke

unread,
Nov 12, 2012, 8:36:51 PM11/12/12
to mobile-c...@googlegroups.com

On Nov 12, 2012, at 4:36 PM, Tobin Harris <to...@engineroomapps.com> wrote:

This means I never know when we're done. How do I find out what it's stuck on?

If it goes to ‘idle’, you can consider it done. If completed < total, that means not all the docs could be replicated, and it’ll try again in a little while. What’s the .error property of the replication?

—Jens

Jens Alfke

unread,
Nov 12, 2012, 8:39:11 PM11/12/12
to mobile-c...@googlegroups.com

On Nov 12, 2012, at 5:34 PM, dyowee <csharpen...@gmail.com> wrote:

There seems to be a weird issue with Cloudant. I am replicating with a read/write access, and it has been getting stuck with replication for a few days now. So what I did is make the user 'admin', just to test. And the problem when away. Replication seems to work ok and fast. Is this a Cloudant issue or TouchDB?

I don’t know. Len Kawell has been seeing this type of issue too.

I think the next step is that someone who can reproduce this needs to capture the requests/responses going over the wire, to see what the authentication headers look like. This would probably require using something like the Charles proxy that’s been mentioned here before.

—Jens

dyowee

unread,
Nov 12, 2012, 9:07:44 PM11/12/12
to mobile-c...@googlegroups.com
I understand sir. I will try to see if I can capture the requests/responses. Thanks!
Message has been deleted

Tobin Harris

unread,
Nov 13, 2012, 4:18:08 PM11/13/12
to mobile-c...@googlegroups.com

Are you replicating against Cloudant? I'm getting some issues too for the past couple of days. :(


Nope, this is against local couchdb v1.2.0.

T

Tobin Harris

unread,
Nov 13, 2012, 4:19:27 PM11/13/12
to mobile-c...@googlegroups.com


If it goes to ‘idle’, you can consider it done. If completed < total, that means not all the docs could be replicated, and it’ll try again in a little while. What’s the .error property of the replication?

 
That makes sense for what I'm seeing...

2012-11-13 00:34:56.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

2012-11-13 00:34:59.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:02.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:05.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:08.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:11.422 entrygenius-ios[14305:707] Idle, 1

2012-11-13 00:35:14.422 entrygenius-ios[14305:707] Processed 6886 / 6887 changes, 1

 So, I just need to find out which document could not be replicated and diagnose from there.

T


—Jens

Jens Alfke

unread,
Nov 13, 2012, 7:40:36 PM11/13/12
to mobile-c...@googlegroups.com

On Nov 12, 2012, at 7:45 PM, dyowee <csharpen...@gmail.com> wrote:

Sorry sir, but I'm trying to check the 'completed' and 'total' properties, but they are always 0. I'm using one-shot push/pull replication. 

They shouldn’t be. Please file a bug report, including TouchDB [not CouchCocoa] logging. Thanks!

—Jens

dyowee

unread,
Nov 13, 2012, 9:40:19 PM11/13/12
to mobile-c...@googlegroups.com
Will do sir. Thanks. :)
Reply all
Reply to author
Forward
0 new messages