Changes in documents with attachments don't get replicated properly

115 views
Skip to first unread message

Matija Alanović

unread,
May 7, 2014, 10:36:28 AM5/7/14
to mobile-c...@googlegroups.com
Dear Sir/Madam!

I ran into a problem using Cloudant database hosting service and Couchbase Lite SDK for iOS and Android. When a property of a document containing attachments gets changed, the continuous replication process doesn't work as it should.

Consider the following example. Suppose that I have a document with only one property, "name", with value "AAA". If I change that property's value to "BBB" using Cloudant's dashboard, the iOS and Android applications display the changes promptly.
However, if that document also contains an attachment, the replication process lasts considerably longer, and the changes are not propagated to the client applications.

So, changes to documents which contain attachments are not replicated at all. This happens both on iOS and on Android. The Android version sometimes logs an error like this:
Got error 500
E  Request was for: org.apache.http.client.methods.HttpGet@427bbf10
E  Status reason: Internal Server Error.
The iOS version logs no errors, but behaves the same.

I haven't experienced any problems with replication earlier so I think this is a relatively new problem. I have also contacted Cloudant's support service, in case it's a problem with their service.

Thank you in advance,
best regards,
Matija

Jens Alfke

unread,
May 7, 2014, 10:55:36 AM5/7/14
to mobile-c...@googlegroups.com

On May 7, 2014, at 7:36 AM, Matija Alanović <mat...@infinum.hr> wrote:

Consider the following example. Suppose that I have a document with only one property, "name", with value "AAA". If I change that property's value to "BBB" using Cloudant's dashboard, the iOS and Android applications display the changes promptly.
However, if that document also contains an attachment, the replication process lasts considerably longer,

There was a recently-fixed bug on iOS where all attachments would be re-sent on every push (#326). But it was a recently-introduced bug too; I think it only existed on the master branch since 3/31, i.e. after beta 3.1. So unless you’re building your own CBL from source you wouldn’t have seen it.

The Android betas all have the same bug because the attachment-filtering simply hadn’t been implemented yet; but I think Andy’s recently added it(?)

… and the changes are not propagated to the client applications.

That’s not a known issue. You’re seeing this with both iOS and Android clients?

I haven't experienced any problems with replication earlier so I think this is a relatively new problem.

Please let us know exactly what build or Git revision you’re using.

—Jens

Andrew Reslan

unread,
May 7, 2014, 11:59:38 AM5/7/14
to mobile-c...@googlegroups.com
Android (master) now implements the logic to not resend attachments from Couchbase Lite to the server when only JSON properties have been updated on a document.

Traun Leyden

unread,
May 7, 2014, 12:40:27 PM5/7/14
to mobile-c...@googlegroups.com
Beware that syncing attachments from Couchbase Lite Android -> Cloudant won't work due to: https://github.com/couchbase/couchbase-lite-android/issues/214


On Wed, May 7, 2014 at 8:59 AM, Andrew Reslan <andrew...@mac.com> wrote:
Android (master) now implements the logic to not resend attachments from Couchbase Lite to the server when only JSON properties have been updated on a document.

--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/867f26dd-7630-47b0-8985-88904b5d2680%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Matija Alanović

unread,
May 8, 2014, 3:26:48 AM5/8/14
to mobile-c...@googlegroups.com


Dana srijeda, 7. svibnja 2014. 16:55:36 UTC+2, korisnik Jens Alfke napisao je:
There was a recently-fixed bug on iOS where all attachments would be re-sent on every push (#326). But it was a recently-introduced bug too; I think it only existed on the master branch since 3/31, i.e. after beta 3.1. So unless you’re building your own CBL from source you wouldn’t have seen it.

The Android betas all have the same bug because the attachment-filtering simply hadn’t been implemented yet; but I think Andy’s recently added it(?)


I don't think I've seen this problem on iOS, but even if I did, it wouldn't matter that much as this one. Changes in documents with attachments don't get replicated at all.


That’s not a known issue. You’re seeing this with both iOS and Android clients?

Yes, the issue is present both on iOS and on Android.
 
 

Please let us know exactly what build or Git revision you’re using.

 On iOS, I was using a version that I downloaded maybe a month or two ago, and yesterday I downloaded the current version. The issue is present on both the old and the new version. I haven't had this problem before. This leads me to believe that it's an issue on Cloudant's side, as they recently updated their DB engine. However, I wanted to report it here too, in case it was already discovered by someone else.
I'm not sure what revision the Android team is using, but it should be the one downloaded a month or two ago and it also worked great until now. We tested this behavior in several applications.

Matija Alanović

unread,
May 8, 2014, 7:44:03 AM5/8/14
to mobile-c...@googlegroups.com
Just got a confirmation from Cloudant that this should be an issue on their end.

Jens Alfke

unread,
May 8, 2014, 10:15:42 AM5/8/14
to mobile-c...@googlegroups.com

On May 8, 2014, at 4:44 AM, Matija Alanović <mat...@infinum.hr> wrote:

Just got a confirmation from Cloudant that this should be an issue on their end.

Ah, thanks! Good to know. And please post again when you hear an update, as there are other readers using Cloudant too.

—Jens

Matija Alanović

unread,
May 21, 2014, 4:05:41 AM5/21/14
to mobile-c...@googlegroups.com


Dana četvrtak, 8. svibnja 2014. 16:15:42 UTC+2, korisnik Jens Alfke napisao je:

Ah, thanks! Good to know. And please post again when you hear an update, as there are other readers using Cloudant too.

—Jens

Cloudant's support team has just informed me that they have taken care of this problem. I tested it on my application and it works as it should again, so this problem is resolved.

AJ

unread,
Jun 3, 2014, 4:39:37 AM6/3/14
to mobile-c...@googlegroups.com
Contact Cloudant support and they confirmed the problem is on their end.  Some of their multi-tennant servers aren't patched, but they're on it.  In the interim they're moving me to another server.

Good prompt support, that's what we like to see!

Matija Alanović

unread,
Jun 3, 2014, 6:05:07 AM6/3/14
to mobile-c...@googlegroups.com
They do respond quickly, but it took them a few weeks to actually resolve the issue the first time I spotted it.


On Tue, Jun 3, 2014 at 10:39 AM, AJ <ad...@great-sky.net> wrote:
Contact Cloudant support and they confirmed the problem is on their end.  Some of their multi-tennant servers aren't patched, but they're on it.  In the interim they're moving me to another server.

Good prompt support, that's what we like to see!

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/ZybaUUPKNmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/bcfcd225-f8b2-4a3d-b43c-882e67c1ca70%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages