Bug Report: AnkiHub Syncing Delay

Description: Users are experiencing delays in syncing with AnkiHub. Specifically, @anking.jacob has reported that large bulk updates will take quite some time to “appear” and sync to the Anki application. @Ahmed7 has noted that it has taken up to 30 minutes to receive a syncable update from changes merged on the web, even if those changes are small single-card merges at a different time than a large bulk update. I am able to verify that small merges I made this morning at ~1pm did not sync to my application until roughly 1:30pm.

Steps to reproduce:

  1. Make a large bulk update to AnkiHub.
  2. Attempt to sync the app with the web app.

Expected behavior: The AnkiHub app should sync with the web app quickly, reflecting the changes made on the web.

Actual behavior: Anki sync is experiencing delays in syncing with the web app, even long after the large bulk update has been made.

Priority: High. This issue may lead to overriding suggestions, and bog down workflow, especially if maintainers are submitting conflicting updates at similar times.
@TheAnKing @andrew

3 Likes

When you say “Make a large bulk update” you mean bulk merging a lot of suggestions using the ankihub web interface? Or sending a big number of suggestions from the anki desktop? And how large are those bulk updates?

Also, just to make sure I got this right: the delay mentioned is not the syncing time at the anki desktop (i.e. the progress bar is slow). The problem here is that changes made on the webapp are not immediately being retrieved by the anki addon. So you make some changes on the webapp, then click “sync” at the anki desktop and no changes are retrieved. After some time (let’s say half an hour) you click sync and then everything is downloaded to your local deck normally. Is that right?

1 Like

yes it is not the “loading progress bar”, its just that I submit a suggestion, accept it, then when I press sync, it says 0 changes have been made, only after 20-30 minutes it tends to show up. A few other times the change never even showed up (only happened 1-2 times) and I had to unsubscribe/resubscribe to see the change. I also always make changes on the ankihub website, never straight from my anki.

@Ahmed Got it, thanks for the clarification!

What was the size of the largest bulk update you made that caused this bug to happen? Like 1000, 2000 suggestions at once?

@dollajas would know better on this, i think this started when bootcamp_eborne submitted around 8,000-10,000 tags for BootCamp, I believe after we accepted them then I started noticing the weird syncing delays, it stayed after that regardless whether we accepted some or not

We just released a new version that should fix that! Please try it out and let us know if this issue was solved or if there are any problems :smiley:

3 Likes

For a different deck (BlueAce Ophthalmology), I just made a suggestion and checked the maintainer button. It went through immediately.

1 Like

Where can I access this new version? I haven’t received any prompts for an add-on update

No changes were made in the addon, the new version I was referring to is the AnkiHub web version. If you’re accessing https://app.ankihub.net/, you are already in the last version :slight_smile:

To test if the changes made solved the issue try replicating the scenarios you mentioned and see if the updates are synced without delay.

I’ve merged ~50 existing community suggestions this morning at 12:20am and just finally received them locally (13:10am currently).

Oh :frowning:
That’s weird. We’ll investigate it further to uncover what might be causing this.

Here is a record of the actions I am taking. When I commented previously, I continued to test a sync for 50 minutes before I was able to receive those updates. This occurs with individual suggestions as well as bulk updates despite the error report in my original post.

https://imgur.com/a/Upkje1F

1 Like

Thank you for your continued effort on this! After you pushed that update, I merged one suggestion I made and it took 1 minute until I could see it being synced on my anki. So it definitely improved but it does seem to still fluctuate between minutes to upwards of 30, as @dollajas mentioned

1 Like

@dollajas , you first noticed this on Wednesday, Jan 18th, right? Are you confident that you would have noticed this problem right away? I.e., if we introduced a bug on Jan 17th or 16th, would you have seen and reported it right away? Just trying to narrow down the date range that this might have happened. Also, can you share your logs?

@heitor , @jakub.f , I don’t see any recent AnkiHub development that could have caused this. And I’m confused why this problem wasn’t noticed sooner if yesterday’s hotfix was actually necessary.

There were some recent add-on refactors around sync code, but nothing that should cause this, AFAICT. Still, I’m wondering if this is add-on side. This could be caused by the add-on not keeping track of the last sync time properly, so we should look into any changes that touched the code that manages the private config file. @jakub.f , maybe something related to adding Anki profiles support?

Yes I first noticed the issue Jan 18th at ~12:50 PM EST. I merge suggestions and sync with AnkiHub daily. Prior to bulk updates done by @anking.jacob at around 1-2pm EST on Jan 17th I did not notice any syncing delay. This was the second big bulk update we have done.

Prior to the initial big bulk update @anking.jacob did (Jan 10th), he reported that he did not receive a sync reflective of his changes until some time later (~1-2 hours I believe). I did not have an issue at that time, but after this update on the 17th, the syncing delay seems to have persisted to individual suggestions as per above.

I’m beta testing the new AnkiHub add-on (not sure if that will have erased my logs) but here are my logs: ankihub_addon_logs_247e8_1674231800.log

We can ask @anking.jacob and @Ahmed7 to also share their logs as well if you need, since they have also observed this issue.

1 Like

The changes related to Anki profile support were not released yet so this can’t be it.

I don’t think that this is caused by the add-on requesting updates using a wrong last sync value, because it would need to send a larger time value than it should to not get updates. (Since the api returns all updates since the last sync value). The updates arrive eventually, so the add-on would need to send a smaller value than previously. I can’t imagine how this could happen.

If you just sync without unsubscribing and re-subscribing to decks the last sync values should only increase on subsequent syncs of the same deck for an particular user.

1 Like

@dollajas , have you only noticed this with bulk merging note changes as opposed to bulk merging new note suggestions?

Also, have you noticed this after merging changes from any other user? or only @anking.jacob ?

I have noticed this with single or bulk note changes from any user. I have only tested syncing with merging community suggestion changes to existing notes. I have not tried merging any new notes.

1 Like

not sure if this will help but here is a copy of my logs: ankihub_addon_logs_7adb6_1674250628.log

@dollajas , we have a working hypothesis and just deployed the associated code changes. Can you test this again and let me know how it goes?