Optimistic locking
  • 29 Aug 2023
  • 1 Minute to read
  • Dark
    Light

Optimistic locking

  • Dark
    Light

Article summary

Optimistic Locking

Optimistic Locking is a strategy used to handle concurrency issues. We use it in Access PaySuite to prevent data loss. It's called "optimistic" because it assumes that the data loss is reversible. So we allow a conflict to occur, but then we need to detect it upon committing our transaction, and we do this using an ETag.

These issues typically occur when data is being modified by a merchant and an ISV at the same time. For example, a merchant could be editing their details on the portal, while at the same time, the ISV is doing the same, programattically or manually via customer support.

  1. You get the ETag back from Create Merchant. If the Merchant record has been edited since then you need to refetch the ETag by Get Merchant.

  2. For the application ETag, use Get Application.
    If you don't know the application ID you will need to get the application list to see what application ID is assigned in the onboarding application.


Was this article helpful?