As it stands, when 2 users are editing a webform submission at the same time each user is overwriting the other's work and vise versa. The goal of this issue is to use an Optimistic Blocking strategy similar to the one used in Core to prevent users from overwriting each other's work.

Optimistic Locking is a strategy where you read a record, take note of a version number (other methods to do this involve dates, timestamps or checksums/hashes) and check that the version hasn't changed before you write the record back. When you write the record back you filter the update on the version to make sure it's atomic. (i.e. hasn't been updated between when you check the version and write the record to the disk) and update the version in one hit.

If the record is dirty (i.e. different version to yours) you abort the transaction and the user can re-start it.

This will be an optional setting, so if someone doesn't want the overhead of optimistic blocking they can disable it at will.

Comments

rymcveigh created an issue. See original summary.

  • rymcveigh committed 34282a3 on 8.x-1.x
    Issue #3110506 by rymcveigh: adds optimistic locking to third party...
rymcveigh’s picture

Status: Active » Fixed
rymcveigh’s picture

Issue summary: View changes

  • rymcveigh committed 6af3985 on 8.x-1.x
    Issue #3110506 by rymcveigh: adds new helper service
    

  • rymcveigh committed 3d2d2ff on 8.x-1.x
    Issue #3110506 by rymcveigh: remove unneeded setting
    

  • rymcveigh committed 2c5a344 on 8.x-1.x
    Issue #3110506 by rymcveigh: give a bit more time between saves
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.