Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Buried cards not scheduled same as Anki Desktop (24 hours vs day start?) #5923

Closed
boolbag opened this issue Apr 4, 2020 · 28 comments
Closed

Comments

@boolbag
Copy link

boolbag commented Apr 4, 2020

EDIT: After further observation, my OP was wrong: the different accounting for Buried cards does not rely on the time of day, but on some random trigger. One most days they're counted in due cards, on some days they're not.

The OP follows


The screenshot shows DUE cards being inconsistent between Anki Desktop (top of screen) and Ankidroid (bottom) after syncing. The difference corresponds to the number of cards that were BURIED the previous day. Anki Desktop seems to unbury cards at the "start of day" (4am in my case), whereas Ankidroid seems to bury cards for 24 hours or something like that. This only happens in V2.

Ankidroid_Buried_Bug

Steps to reproduce:

  1. Switch to V2
  2. Set your "Start of Day" to 4am
  3. Bury ten cards at 11am
  4. Compare your due counts at 8am the next day
@mikehardy
Copy link
Member

@hssm I am still in the habit of reflexively tagging you in on V2 scheduler stuff though I understand this is the 2nd one on the stack and you may or may not have time. Cheers!

@boolbag
Copy link
Author

boolbag commented May 1, 2020

V.2.9.6 contains some fixes for sync issues, will report back in a few weeks if the issue (which is fickle) has been resolved.

@boolbag
Copy link
Author

boolbag commented Jun 2, 2020

Just wanting to report that the issue still occurs on 2.10.4.
It doesn't happen every day, in fact it didn't do it for about a month, but today I had a diff again between Desktop and Ankidroid, corresponding to the number of buried cards.

@mikehardy
Copy link
Member

Hi there - you should try the alphas, there is a change with regard to buried siblings and ecosystem compatibility (read as: to behave same as Anki Desktop) queued for that and I'm curious if it resolves the issue

https://docs.ankidroid.org/#betaTesting

@JasonBaby87
Copy link

Hi! I just encountered this issue today

Here's the debug info :

AnkiDroid Version = 2.11.3

Android Version = 10

ACRA UUID = 51ea7863-10e4-4c4b-b5f2-4b0943d00634

@boolbag
Copy link
Author

boolbag commented Jun 21, 2020

After further observation, my OP was wrong: the different accounting for Buried cards does not rely on the time of day, but on some random trigger. One most days they're counted in due cards, on some days they're not.

Since on most days Ankidroid correctly adds Buried cards to the review list but on random days entirely fails to add any of the Buried cards, my hunch is that there's a piece of code to compute "due cards" that was copy-pasted at some stage and that hasn't been refactored: the calculation for "normal days" has evolved correctly, but there's an event that triggers an alternate calculation of due cards on certain days, and that piece has not been updated. Just a guess.

Just installed the alpha, though, so crossing my fingers, will report back if the behavior continues.

@boolbag
Copy link
Author

boolbag commented Aug 19, 2020

Update: this discrepancy is still happening on 2.13alpha 13

@mikehardy
Copy link
Member

@boolbag thanks for reporting back - We're up to alpha17 now :-), though I'm not sure if this has been specifically addressed we are definitely in the scheduler working on it - you can always sign up for google to deliver the alphas (via info on the "betaTesting" link anchor above or install parallel builds just for testing (like the .A or .B) from here https://github.com/ankidroid/Anki-Android/releases/tag/v2.13alpha17

@boolbag
Copy link
Author

boolbag commented Aug 19, 2020

@mikehardy Wow, these alphas move really fast! Feels like alpha 13 was four days ago. :)

I regret not being able to contribute to the project coding-wise. Mobile apps are not my skill set.

But trying to do my bit — swimming in thousands of Anki-related Python code at the moment, working on something I'm planning to release in ten days or so.

I know this is not a chat board but just wanted to say how much I appreciate Ankidroid and how grateful I am for this beautiful app of yours.

@boolbag
Copy link
Author

boolbag commented Aug 27, 2020

One further comment: after I installed the alpha on June 21, I had no further sync discrepancies for about a month and a half during which I didn't update. Then around August 15 I updated to 2.13Alpha13 (and kept updating to 2.13 Alpha20) and the discrepancies returned, currently every day. So maybe something that had been fixed in an earlier alpha was unfixed?

Just reporting. Updating to alpha 22.

@dae
Copy link
Contributor

dae commented Aug 27, 2020

boolbag: could your issue be related to this one?

https://forums.ankiweb.net/t/bug-buried-cards-in-filtered-decks-not-being-unburied-next-day/2541

@boolbag
Copy link
Author

boolbag commented Aug 27, 2020

@dae It's the opposite of that issue:

  • Anki correctly unburies cards the next day
  • Ankidroid often fails to unbury cards, so in the morning I have a different count.

This forces me to force a sync in the Desktop→Ankiweb→Ankidroid direction
Checking Database doesn't help.

@dae
Copy link
Contributor

dae commented Aug 27, 2020

I'm wondering if it may be the same underlying issue, just happening in opposite directions (because of differences in timezones for example). Do you use long learning steps? If not, are you able to switch back to the v1 scheduler to see if that makes the issue go away?

@boolbag
Copy link
Author

boolbag commented Aug 27, 2020

Hi Damian, this is ankilosis from the forum by the way.

  • Yes, this only appeared after I switched to V2.
  • Yes, using learning steps: 2 15 1440 5760 14400, graduate at 30 days, easy 4 days

@dae
Copy link
Contributor

dae commented Aug 28, 2020

Ok, sounds like switching is not practical for you. The new timezone code is hopefully not far off - once that lands, I will be interested to hear if that resolves the issue for you. The tracking issue is here: #5805

In the mean time, if AnkiDroid has an unbury action you should be able to use that on each top deck instead of forcing a full sync. If you nest all your decks under one top level deck, it will make it easier.

@dae
Copy link
Contributor

dae commented Aug 28, 2020

@boolbag starting from tomorrow, please try the workaround mentioned on the forum link, and let us know if that stops the problem from happening

@dae
Copy link
Contributor

dae commented Aug 28, 2020

A fix for the computer version is in the latest beta - it was a regression caused by syncs no longer requiring a collection reload. If tapping on a deck before syncing fixes your issue as well, AnkiDroid will need to add a call to _updateCutoff() at the start of the sync.

@Arthur-Milchior heads up

Arthur-Milchior added a commit to Arthur-Milchior/Anki-Android that referenced this issue Aug 28, 2020
As requested by DAE on ankidroid#5923 (comment)

This ensure that unburying occurs before sync if needed.
@Arthur-Milchior
Copy link
Member

I don't see any new call to _updateCutoff in the computer version, so I don't see what was done to fix it and can't easily copy it.
I'm going to assume that #6987 is correct

mikehardy pushed a commit that referenced this issue Aug 28, 2020
As requested by DAE on #5923 (comment)

This ensure that unburying occurs before sync if needed.
@boolbag
Copy link
Author

boolbag commented Aug 29, 2020

@dae Thank you for the fix. Using 2.1.33 beta 2, this morning the screen was showing a count of Anki < Ankidroid, and sync'ing fixed it. You mentioned a regression… As of previous versions (like Anki 2.1.21) was it really necessary even to sync in the morning for cards to be unburied? For some reason I don't recall so. Maybe a convo to continue on the Anki forum, will post on that thread.

@mikehardy
Regarding my update message from two days ago saying that 1½ months after switching to Alpha and being sync-errors free for all that time, wondering now if my message misdiagnosed the return of sync problems: at the same time as I updated Ankidroid I also updated Anki. Might not have paid attention to which software showed a lower card count. So it could be that you've already fixed the issue as hinted in much earlier messages. Will report back.

Sorry about the long post, wishing you all a terrific weekend.

@mikehardy
Copy link
Member

@boolbag no problem with the long post, we're hungry for details as there was a scheduler regression in AnkiDroid as well, a fair bit of work for performance on very large collections happens right after the release-2.12 branch cut here, and it took us a while to figure them out. We think we have them, but user reports are the final say in the matter, so do keep us posted. Cheers

@boolbag
Copy link
Author

boolbag commented Aug 29, 2020

👍👍👍
:-) :-) :-)

@dae
Copy link
Contributor

dae commented Aug 30, 2020

To clarify, syncing is not necessary for unburying - the issue was triggered by syncing before the cards got automatically unburied by some other action.

@boolbag
Copy link
Author

boolbag commented Aug 31, 2020

@dae third day on the beta. This morning the cards were at 39 and jumped to 43 when syncing, correctly unburying four cards. From my perspective this is a recent behavior, up to a few months ago I would have looked at the screen in the morning and the deck would already have shown 43. Would love to see the old behavior back sometime, but at least things are easy to sync up now! Thank you. : )

Off-topic: excited to announce the release of Ultimate Spanish Conjugation, a deck driven by thousands of lines of Python which I believe is unique in the Anki language-learning ecosystem. Mentioning it because I always feel bad about not contributing to Ankidroid — so that's my piece of the moment for the Anki community. For anyone curious to see what it looks like, the manual has all the details.

Wishing you all a great week.

@mikehardy
Copy link
Member

As an English speaker living in a Spanish-speaking country (Ecuador) with lots of friends trying to learn the language (including my whole family) that deck sounds cool! I'll give it a whirl. Thanks @boolbag

@david-allison
Copy link
Member

@Arthur-Milchior Fixed in #6987 ?

@Arthur-Milchior
Copy link
Member

normally yes. I've followed upstream and not investigated here, I trusted dae's advise. So I'm not 100% confident. I'd assume that we may simply close, and if the problem occurs again, let @boolbag reopen it.

@boolbag
Copy link
Author

boolbag commented Sep 7, 2020

I'm fine with closing, thank you all for your attention to this issue. 👍
@mikehardy FYI added UUIDs as the front field of that deck so that future updates do not disrupt the queue. If you haven't started I suggest getting the latest.
Wishing you all a great week.

@mikehardy
Copy link
Member

@boolbag I have not started yet, I have 20 items staring at me tempting me to begin ;-) but my kid's school starts this week so I'm limiting workload for the moment as I get that going. I'll grab the latest, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants