Statistics Messed Up After FSRS Reschedule

Hey y’all,

I recently “rescheduled my FSRS cards on change.” It went fine - I’ve read the discussions on this thread about the backlog. However, when I did it, it really messed up my review stats. To be clear - I didn’t actually review all these cards on the massive spike day - the backlog was actually minimal. Is there anyway to fix this?

TLDR: rescheduling my cards on change caused my review graph to spike to a level that did not actually happen.

I believe you have already posted on r/Anki and @L.M.Sherlock said he will take a look at your collection

Looks like the same issue as Thousands of unexpected reviews logged all of a sudden

This is caused by a mismatch in the Anki versions on different devices.

Yeah LM told me to post here

Is there a way to fix it without going into the SQL database?

Since it’s just stats (I know, I know, stats are important, but they aren’t going anywhere!), hold off on messing with the database until the dev finishes looking at it. From this and other reports (including the one vaibhav linked, and on Reddit) – it looks like Reschedule revlogs are being miscategorized or being counted where they shouldn’t be. Since there were some changes around this in the last release, I think it should be fixable!

I think check database should fix this problem. If not, we need implement it.

1 Like

Thanks, appreciate your help guys. I used the check database function but it didn’t fix it.

I’ll stay tuned before going into SQL, I don’t wanna mess it up lol

Try all the steps I mentioned in that thread. To summarise,

  • update all your devices to the latest Anki version (Anki and AnkiMobile 24.11 and AnkiDroid 2.20)
  • check if the issue is gone (unless permanent damage has occured, the issue should go away just after updating)
  • check if any of your devices shows the correct stats. If yes, do a one-way sync from that device.
  • as a last resort, edit the database

Also, an advice for future readers, DON’T use check database while trying to fix this issue. I think that if you use check database on Anki < 24.11, the temporary issue will become permanent. In more technical terms, check database on Anki < 24.11 will think “this type = 5 is an invalid entry, let’s convert this to type = 0.”

If you have to edit the database to correct the issue, the following command in the debug console should work. Please make a backup before using it.

mw.col.db.execute("update revlog set type=5 where type=0 and time=0 and ease=0")

Note: This command can create problems if your database contains actual learning revlog entries with time = 0. This can happen if you used some add-on for grading cards. In that case, you will have to limit the query based on the ids of the revlogs. (not valid after the command was updated based on feedback)

After running this, ensure that everything looks alright and then do a one-way sync from Desktop to Ankiweb.

Thank you so much!! The debug in the console worked perfectly.

For those that are not code minded like me: to open the debug console, click “ctrl shift + :” paste the code and then click ctrl enter.

1 Like

I’d like to suggest an alternative safer command (based on my observations in the previously mentioned post above that all mismatch reviews also have and ease set to 0):

mw.col.db.execute("update revlog set type=5 where type=0 and time=0 and ease=0")

Although I would like to know what others think.

Yeah, this is safer and would work fine.

I edited my comment to include this command so that the future readers will first encounter this one.

1 Like

I don’t think it’s connected to check DB. I think it’s just caused by syncing the revlog entries to an older client that doesn’t understand them. I’ll update the DB check in the next build to handle it.

1 Like

By the way, I am curious how do users end up having this problem on all of their devices? Revlogs can’t be modified by a normal sync. So, even if the type is modified on an older client, how does the revlog type on the other (newer) client get altered?

A one-way sync would be my guess.

Hey guys - just want to highlight this for when you do the patch in the next update. The code fixed my desktop, but my mobile devices are still showing the wrong stats. Even after check DB.

As I said earlier, you need a one-way sync from Desktop to correct the revlogs on other devices.

Go to Preferences → Syncing → On next sync, force changes in one direction.

2 Likes

Yep that worked thank you!! Sorry, I misunderstood what a one way sync was.

1 Like