Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Asterix does not let users know if the updates requests are coming with old data.
eg:-
1) User 1 inserts a record
2) User 2 fetches the record created by User 1
3) User 1 updates the record
4) User 2 updates the same record without knowing that the record was updated by User 1 mean while.
In this scenario, table will have a timestamp column. each time when user create/updates a record... the timestamp column gets updated.
If some one requires optimistic locking the user can comeback with Http request with header
if-modified-since with column name and last updated time.
If the user is coming back with timestamp older than current timestamp in table... send error response with some appropriate code