Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2628

if-modified-since http header to avoid data inconsistencies in DB. Optimistic locking

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • API - HTTP API
    • 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

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bhukailas448@gmail.com Bhukailas Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: