Delayed columndropper issues


(Richard - DiscourseHosting.com) #1

We’ve ran into a few fights with the delayed column dropping mechanism lately. These are rare issues but they cause a lot of pain, relatively speaking.

The question is : is there any way to manually force the columndropper to run?

Details of the issues in case anyone is interested:

  • run migrations, then within an hour export the database and try to import it elsewhere. The import will fail because the required triggers in the discourse_functions schema will not exist on the new host.
  • import or attach a new database into a multisite. The migrations will run but the columns will not drop, causing PG::UndefinedColumn errors and causing Discourse to step in and clear the activerecord cache. This keeps on happening for one hour until the delayed drops are executed.

Being able to force the delayed drops to run would solve work around all those issues.


(Gerhard Schlager) #2

You could trick the system into believing that the first migration ran more than one hour ago.

BTW: This is going to change soon: FEATURE: Post deployment migrations. by tgxworld · Pull Request #6406 · discourse/discourse · GitHub


(Jeff Atwood) #3

Maybe @tgxworld or @sam could comment, as they have time.


(Sam Saffron) #4

Our plan is to introduce a new system that is not subject to these issues in the next few weeks, we will announce it on meta when ready