Page MenuHomePhabricator

If you somehow create a draft with an enormous version, it can get stuck in the database for a very long time
Closed, ResolvedPublic

Description

This probably won't happen on any real install, but if you do something like this:

  • Type some comments on Txxx after thousands of transactions have happened.
  • Truncate your entire transaction table.
  • Interact with Txxx again.

...you can end up with a very sticky draft with an internal ID like 7000 when new transaction IDs aren't that high. It will stick around until the transaction count catches up again.

To reproduce more simply, set the version for any draft_versioneddraft row to a bazillion and then interact with the object.

A possible fix is just to make purgeDrafts() delete everything (i.e., remove the version clause). It's not clear why this clause exists, and it was introduced with everything else in D14640.