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. @Ahmed_DISVSTXR 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:
Make a large bulk update to AnkiHub.
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. @AnKingMed@andrew
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?
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.
@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
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.
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
@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?
@heitorado , @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
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.