Edit of rebaked post doesn't show in HTML; only in raw

I know exactly how this happens:

“cooked post processor” is our process that downloads images from posts, runs slow oneboxes and so on. It only looks at “cooked HTML”

  1. In one process… cooked post processor is running (in sidekiq) this takes a while to run
  2. In another process an edit happens, this produces new “cooked”
  3. The process (1) finishes and overwrites “cooked” produced in (2)
  4. Edit process kicks off “cooked post processor” it uses “cooked” produced by step (3)

End result is that edit happens but cooked is not updated.

The correct solution here is to make sure that cooked post processor always rebakes markdown.

7 Likes