lundi 15 octobre 2018

Ruby: Maximum Waiting time for pessimistic lock?

Two different systems/process try to update same request. However, I am using pessimistic locking mechanism: lock!. Suppose system-1 acquire the lock before system-2. What is maximum waiting time for the system-2 to acquire lock? Related question: If it reached the maximum waiting time, will it rollback transaction?

Request.transaction do

  lock!
    # Do something important

end

Aucun commentaire:

Enregistrer un commentaire