Skip to content

[8.x] Fix DynamoDB locks with 0 seconds duration - #43365

Merged
taylorotwell merged 2 commits into
laravel:8.xfrom
lukaszmtw:fix-dynamodb-shouldbeunique
Jul 22, 2022
Merged

taylorotwell merged 2 commits into
laravel:8.xfrom
lukaszmtw:fix-dynamodb-shouldbeunique

Conversation

@lukaszmtw

@lukaszmtw lukaszmtw commented Jul 22, 2022 •

Copy link
Copy Markdown
Contributor

I've added a default lock duration of 1 day for DynamoDB locks.

This makes the behavior consistent with DatabaseLock:

protected function expiresAt()
{
return $this->seconds > 0 ? time() + $this->seconds : Carbon::now()->addDays(1)->getTimestamp();
}

Fix #43280

@lukaszmtw
lukaszmtw marked this pull request as draft July 22, 2022 11:01
@lukaszmtw
lukaszmtw marked this pull request as ready for review July 22, 2022 11:33
@taylorotwell
taylorotwell merged commit 9d0dfff into laravel:8.x Jul 22, 2022
@driesvints

Copy link
Copy Markdown
Member

Thanks @lukaszmtw

salmanarshad321 pushed a commit to salmanarshad321/framework that referenced this pull request Sep 23, 2026
* Fix DynamoDB locks with 0 seconds duration

* Update DynamoDbLock.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants