Statistics Messed Up After FSRS Reschedule

Edit:
Using Check Database on Anki 25.02 or later will fix the issue.
If multiple devices are affected, use check database on all of them after ensuring that Anki is up-to-date. One-way sync won’t be required.


My suggestion before release of Anki 25.02:

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.

1 Like