Skip to content

More lib specific lock prefix#40

Closed
mvorisek wants to merge 1 commit intophp-lock:masterfrom
mvorisek:more_explicit_lock_prefix
Closed

More lib specific lock prefix#40
mvorisek wants to merge 1 commit intophp-lock:masterfrom
mvorisek:more_explicit_lock_prefix

Conversation

@mvorisek
Copy link
Member

No description provided.

@willemstuursma
Copy link
Contributor

Sorry, this cannot be changed.

When deploying a version of this library the new version will not respect existing locks that are held (that were acquired by the version that does not have this change).

@mvorisek
Copy link
Member Author

mvorisek commented Dec 1, 2020

@willemstuursma good point, but the original prefix can not be used in some enviroments like we have

Until now, we used a fork of this lib, but all offered all customizations as a PRs. If we can not change this, I will still have to maintain that fork... :(

Is this possible to change and release a new major version?

@willemstuursma
Copy link
Contributor

Did you consider using a dedicated redis database for locking then?

@mvorisek
Copy link
Member Author

mvorisek commented Dec 1, 2020

We have only one DB per deploy.

@mvorisek
Copy link
Member Author

@willemstuursma please reconsider merging this PR

@willemstuursma
Copy link
Contributor

We can do a PR where the lock name or prefix is configured in a protected function (which can be overridden) or a constructor argument.

For more info on Redis databases (which are a way of namespacing as well) see https://www.mikeperham.com/2015/09/24/storing-data-with-redis/#:~:text=Out%20of%20the%20box%2C%20every,conf).

A single server supports 16 databases (0-15).

@mvorisek mvorisek deleted the more_explicit_lock_prefix branch January 15, 2021 23:34
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.

2 participants