subql icon indicating copy to clipboard operation
subql copied to clipboard

DB write locks

Open stwiname opened this issue 10 months ago • 0 comments

In order to guard against more than one node running for the same project and schema there should be a lock on the tables for the schema to stop this happening.

Requirements:

  • Setup write lock on all tables in the schema. Query should look something like this LOCK TABLE schema_name.* IN ACCESS EXCLUSIVE MODE;
  • Don't create write locks if the project is a multichain project
  • It should update the locks with any schema migrations
  • It should work with POI. This currently has another connection for a sync task.

stwiname avatar Apr 03 '24 20:04 stwiname