Re: [Ankidroid] Conflicts during syncing, how to avoid them?

2,194 views
Skip to first unread message

Tomasz Melcer

unread,
May 27, 2013, 7:42:53 PM5/27/13
to anki-a...@googlegroups.com
On 28.05.2013 01:26, Greg Ihnen wrote:
> Are there some guidelines on how to avoid conflicts?

For me it's syncing as often as possible—before and after any session
where I modify or review anything. I'm using desktop Anki not as often
as AnkiDroid, so in my case I'm just syncing mobile→web and web→desktop
before doing anything in desktop Anki, and then desktop→web, web→mobile
after.

In some way you can see this process as ensuring that it's always at
most one device that differs from the authoritative version from the web
account.


--
Tomasz Melcer

Tim

unread,
May 28, 2013, 2:32:11 AM5/28/13
to anki-a...@googlegroups.com
Normally you shouldn't need to do a full sync unless you modify the same cards (as you say), or do something else like adding a new card template in Anki Desktop, which tells you that the action will require a full sync.
It sounds like something is wrong, can you please try going tools->maintenance->check database from Anki Desktop, then do a full sync.

If the problem is still occurring then please reply, writing exactly what actions you are taking in each client directly after the full sync to reproduce the problem.

On Tuesday, May 28, 2013 8:26:08 AM UTC+9, Greg Ihnen wrote:
I assumed that by not editing the same cards and same decks that one could avoid conflicts during syncing, but I'm still getting errors from Ankidroid saying that I have to choose between one version or the other (server side or local side) as the keeper as the changes can't be merged. So I'm losing work. I'm feeling like the only resolution is to use only one device for editing which would be a pain. I often have only the phone with me, but editing is so much easier on the computer. I'd hate to have to use only one or the other.

Are there some guidelines on how to avoid conflicts?

Thanks!
Greg

Greg Ihnen

unread,
May 28, 2013, 7:41:01 AM5/28/13
to anki-a...@googlegroups.com
Thanks Tim!

I'm following your suggestions now. It's happened to me more than once that after editing cards on two different devices that Ankidroid told me I had to do a full sync. I've never made changes on either device that warned me my actions would require a full sync.

Is it safe to assume that if one doesn't edit the same card on two devices that changes will merge OK?

Is it safe to assume that if one doesn't edit cards in the same deck on two devices that the changes will merge OK?

I'm assuming that the design goal is that as long as changes don't directly conflict such as the same card being edited on two different devices that the changes should merge gracefully.

It would be nice if the conflicting changes conflicts were resolved more gracefully for example with a list of conflicts and provision for the user to choose which of the conflicting changes to keep. It seems that current approach is to force a full sync.

The reason my devices were getting out of sync is I live where there is only sporadic access to the internet, so I found myself editing cards on both devices without performing a sync first, though the last time this happened I had made an effort to not edit the same cards on both devices.

Greg

--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Houssam Salem

unread,
May 28, 2013, 8:56:04 AM5/28/13
to anki-a...@googlegroups.com
Editing the same card or cards in the same deck is not a problem. I believe it chooses the most recently modified one and continues to merge the rest as usual. There must be something else going on. 

- Did it say anything about a sanity check failure when syncing?
- Do you bury cards or undo reviews regularly?
- Do you create/rebuild/empty/delete filtered decks regularly?

I've had sanity check failures before (and thus needed to full-sync), but I've never been able to figure out what caused it.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android+unsubscribe@googlegroups.com.

Damien Elmes

unread,
May 28, 2013, 8:16:20 PM5/28/13
to anki-a...@googlegroups.com
On the desktop version, you're always notified before an operation that will cause a conflict. The only other way it can happen is if syncing fails, then it automatically forces a one way sync on the next sync. 

Greg Ihnen

unread,
May 30, 2013, 7:53:34 PM5/30/13
to anki-a...@googlegroups.com
Wow. So one failure to sync and it gives up and demands full sync from then on? Would a failure to sync due to network issues cause the need for a full sync? If so this is going to be a big drawback in the third world (where I'm currently at).

Greg
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.

Greg Ihnen

unread,
May 30, 2013, 7:58:33 PM5/30/13
to anki-a...@googlegroups.com
Answers inline:

- Did it say anything about a sanity check failure when syncing?

  I'm pretty sure the answer is no to that.

- Do you bury cards or undo reviews regularly?

  By undo reviews, would that include the study option where you finish studying a deck and to continue studying the same deck you have to override the study settings (I'm forgetting what it's called)? I have done that, when I was presented with a choice that said to study further I needed to change the settings.

- Do you create/rebuild/empty/delete filtered decks regularly?

  Yes, to create and delete filtered decks. Is that a no-no?

Thanks for the help!

Greg
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.

Damien Elmes

unread,
May 30, 2013, 9:30:48 PM5/30/13
to anki-a...@googlegroups.com
Network errors do not force a full sync, it only happens when the collections on each end are inconsistent.

Houssam Salem

unread,
May 31, 2013, 4:08:21 AM5/31/13
to anki-a...@googlegroups.com
Undoing reviews is just Menu -> Undo, if you want to change your answer. 

Doing any of these is fine, they're all typical uses of Anki. I'm just trying to narrow down any particular sequence of operations that might trigger it since I've definitely had it happen before. How regularly do you get the conflicts? Every sync?

Greg Ihnen

unread,
May 31, 2013, 4:53:23 AM5/31/13
to anki-a...@googlegroups.com
OK, thanks!

Greg

Greg Ihnen

unread,
May 31, 2013, 4:55:43 AM5/31/13
to anki-a...@googlegroups.com
I've received the error and needed to do a full sync two times in the past month. I'll be more careful about not editing cards on both devices, and sync more frequently and see what happens. So far since I did the check database on the desktop and then forced a full sync up and on my portable device did a full sync down all has been good, but I really haven't been editing since. I plan to get into that big time in the next few days.

Greg

Greg Ihnen

unread,
Jun 11, 2013, 7:53:51 AM6/11/13
to anki-a...@googlegroups.com
I just had another problem while syncing. I've not made any changes in Anki desktop, only on my Android phone/Ankidroid. I just attempted a sync and I think the first message was something about an "inconsistent state" after syncing and it said I needed to do a full sync. Because of my poor internet connection that attempt failed. Additional attempts to sync bring a different message saying that there is a sync conflict and a full sync is needed.

I received no message about a "sanity check". I don't bury cards or undue reviews. I think I did make one filtered deck. Is that something that breaks syncing?

Greg

Damien Elmes

unread,
Jun 11, 2013, 7:59:39 AM6/11/13
to anki-android
This looks like an AnkiDroid bug. The local deck count was higher than the one on the server, indicating AD failed to send locally added decks. Please report it on the AD issue tracker. If you can provide the exact steps to trigger the 'inconsistent state' message, the devs will likely be able to fix it more quickly.


--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.

Greg Ihnen

unread,
Jun 11, 2013, 9:06:20 AM6/11/13
to anki-a...@googlegroups.com
Will do. Also I often have a problem that if I repeatedly go between the list of decks and decks to edit and/or study them AD hangs. It happens when I move back to the list of decks, AD shows the blue splash screen and says opening collection and the circle spins but it never progresses. I have to force quit the process and reopen AD. It seems like I never lose data but maybe that's related to the problem with my syncing issues?

Greg
--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Damien Elmes

unread,
Jun 11, 2013, 11:10:09 PM6/11/13
to anki-android
You're probably best off reporting that as a different issue.

gr...@ihnen.me

unread,
Aug 12, 2013, 10:28:54 AM8/12/13
to anki-a...@googlegroups.com
Update on this issue - The way I stopped AnkiDroid from wanting to do full syncs for apparently no reason, is when AnkiDroid hangs when going back to the list of decks (I says "opening decks" but never finishes, I shut my phone off and restart it. Before I learned this trick I was terminating the process and then restarting it. That was triggering a full download on sync. My phone is a Motorola Atrix (the first one) running Gingerbread 2.3.4.

Greg


On Tuesday, June 11, 2013 10:40:09 PM UTC-4:30, Damien Elmes wrote:
You're probably best off reporting that as a different issue.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android+unsubscribe@googlegroups.com.

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

--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android+unsubscribe@googlegroups.com.

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

Flavio Lerda

unread,
Aug 12, 2013, 10:36:13 AM8/12/13
to anki-a...@googlegroups.com
Hello Greg,

Yes, if you force close the application it is likely the database will be left in an inconsistent state and therefore a full sync would be required in that case.
I think from some people that reported this, pressing back or home when AnkiDroid is stuck at the opening decks screen seemed to solve the problem.

Flavio
Reply all
Reply to author
Forward
0 new messages