CivicSpleen / ambry

A comprehensive data package manager
BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Updates on sequences blocks by tables query. #171

Open ericbusboom opened 8 years ago

ericbusboom commented 8 years ago

After adding the dstate value to datasets, assigning to the value without committing leads to sequence id updates getting blocked by queries for tables on postgres.

ambry library pg -b reports:

SELECT tables.t_vid AS tables_t_vid, tables.t_id AS tables_t_id, tables.t_d_id AS tables_t_d_id,

is blocking:

UPDATE datasets SET d_t_sequence_id = d_t_sequence_id + 1 WHERE d_vid = 'dERJQxWUVb001' RETURNING d_t_sequence_id

Adding a commit after assignments to bundle.dstate seems to solve the problem.