Skip to content
Permalink
Browse files

bug #32299 [Lock] Stores must implement `putOffExpiration` (jderusse)

This PR was merged into the 4.2 branch.

Discussion
----------

[Lock] Stores must implement `putOffExpiration`

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | /

Following #32198 (review) every stores MUST implement the method `putOffExpiration` either by ignoring the arguments (by design they lock forever) or using a mechanism to define the expiration.

It was a mistake to add the dockblock `@throws NotSupportedException` tell me if it's a BC break, I'll create a dedicated PR for it.

Commits
-------

c986c86 [Lock] Stores must implement `putOffExpiration`
  • Loading branch information...
fabpot committed Jul 3, 2019
2 parents 34c50c0 + c986c86 commit c33c396a6319e6ceb3c0ccd5abd0894178e07d04
@@ -91,7 +91,7 @@ public function waitAndSave(Key $key)
*/
public function putOffExpiration(Key $key, $ttl)
{
throw new NotSupportedException();
// do nothing, zookeeper locks forever.
}
/**
@@ -49,7 +49,6 @@ public function waitAndSave(Key $key);
* @param float $ttl amount of seconds to keep the lock in the store
*
* @throws LockConflictedException
* @throws NotSupportedException
*/
public function putOffExpiration(Key $key, $ttl);

0 comments on commit c33c396

Please sign in to comment.
You can’t perform that action at this time.