~rvb/maas/1.5-bug-1298790

Viewing all changes in revision 2217.

  • Committer: MaaS Lander
  • Author(s): Gavin Panella
  • Date: 2014-04-01 17:33:24 UTC
  • mfrom: (2208.4.5 rpc-create-table-race)
  • Revision ID: maas_lander-20140401173324-6fx49valy79nggvd
[r=jtv][bug=1300363][author=allenap] Take an advisory lock to prevent concurrent creation of the eventloops table.

Creating tables in PostgreSQL is a transactional operation like any
other. If the isolation level is not sufficient - the default in Django
- it is susceptible to races. Using a higher isolation level may lead to
serialisation failures, for example. Advisory locking side-steps this.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: