aodn / nrmn-application

A web application for collation, validation, and storage of all data obtained during surveys conducted by the NRMN
GNU General Public License v3.0
4 stars 3 forks source link

Survey corrections service #1089

Closed nspool closed 2 years ago

nspool commented 2 years ago

Survey measurements can now be added, updated or deleted and surveys can be removed. All correction operations will create a Job of type "Corrections" containing a summary of operations performed.

All functions should be gated behind the "Corrections" feature flag.

nspool commented 2 years ago

@utas-raymondng Yes that's right. The whole correction update will complete in a transaction so that if another update is performed while one is still in progress, it will fail. This is how the ingest process works currently.

utas-raymondng commented 2 years ago

@utas-raymondng Yes that's right. The whole correction update will complete in a transaction so that if another update is performed while one is still in progress, it will fail. This is how the ingest process works currently.

What i mean is

  1. User A open the survey and edit row 1 value from a -> b
  2. User B open the same survey and edit row 2 value from c -> d
  3. User A save the survey and completed the transaction, now the survey will have row 1 value b and row 2 value c
  4. User B then save the survey, since the user have not refresh the page, then row 1 value is still a on the user screen. After the save the survey will have row 1 value a and row 2 value d, which discarded user a change.

Is this expected?

bpasquer commented 2 years ago

There may be problem if two people loaded the same survey and edit different row but save it at different time.

@utas-raymondng there is very small risk that 2 people work on the same survey as Toni and Lizzi are responsible for managing different datasets

nspool commented 2 years ago

@utas-raymondng yes this is expected since this is a limitation of the existing ingestion process. There is a backlog item to implement optimistic locking in the future: https://github.com/aodn/backlog/issues/2424.

utas-raymondng commented 2 years ago

There may be problem if two people loaded the same survey and edit different row but save it at different time. @utas-raymondng there is very small risk that 2 people work on the same survey as Toni and Lizzi are responsible for managing different datasets

Ok if is expected behavior