Open dbgoodman opened 8 years ago
The solution is to set up some kind of database lock once materialization starts so that it doesn't start twice. This could be done with a materializing status in addition to a valid/invalid status.
One other potential complication:
Say the view is invalidated to start with. User A loads the variant UI and kicks off a materialization. User B then starts calling SV variants, adding variants to the DB, which then re-invalidates the view before User A's materialization finishes.
Should we restart materialization after user B re-invalidates? We would need to make sure that User B's new variants aren't forgotten in the new materialized view. A dumb lock that ignores User B's re-invalidation would result in a materialized view that was missing the new variants but was marked as 'valid'.
The lock is not a good idea. For example, if the machine goes off during materialization.
If anything we should store a "latest_valid_uid" flag that will prevent clashes.
Even better is if upgrading Postgres fixes this.
On Thu, Jun 16, 2016, 15:47 Daniel Bryan Goodman notifications@github.com wrote:
One other potential complication:
Say the view is invalidated to start with. User A loads the variant UI and kicks off a materialization. User B then starts calling SV variants, adding variants to the DB, which then re-invalidates the view before User A's materialization finishes.
Should we restart materialization after user B re-invalidate? We would need to make sure to make sure to that User B's new variants aren't forgotten in the new materialized view, which could happen with a dumb lock that ignores User B's re-invalidation.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/churchlab/millstone/issues/677#issuecomment-226593325, or mute the thread https://github.com/notifications/unsubscribe/AAORu7dAvwrGooTDdXflwdp59KdZEyzaks5qMahegaJpZM4IyaBu .
You get this error:
Also a corresponding popup dialog error in the browser.