Skip to content

Commit

Permalink
Fix word
Browse files Browse the repository at this point in the history
  • Loading branch information
kkame committed Mar 10, 2019
1 parent ccb74ac commit 8749569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The `KeyWritten` event [was also updated](https://github.com/laravel/framework/p

In Laravel 5.7 and prior versions of Laravel, the "atomic lock" feature provided by some cache drivers could have unexpected behavior leading to the early release of locks.

For example: **client A** acquires lock `foo` with a 10 second expiration. **Client A** actually takes 20 seconds to finish its task. The lock is released automatically by the cache system 10 seconds into **Client A's** processing time. **Client B** acquires lock `foo`. **Client A** finally finishes its task and releases lock `foo`, inadvertently releasing **Client B's** hold on the lock. **Client C** is now able to acquire the lock.
For example: **Client A** acquires lock `foo` with a 10 second expiration. **Client A** actually takes 20 seconds to finish its task. The lock is released automatically by the cache system 10 seconds into **Client A's** processing time. **Client B** acquires lock `foo`. **Client A** finally finishes its task and releases lock `foo`, inadvertently releasing **Client B's** hold on the lock. **Client C** is now able to acquire the lock.

In order to mitigate this scenario, locks are now generated with an embedded "scope token" which allows the framework to ensure that, under normal circumstances, only the proper owner of a lock can release a lock.

Expand Down

0 comments on commit 8749569

Please sign in to comment.