Skip to content

[Lock] Better key naming when possible #60526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

sylfabre
Copy link
Contributor

Q A
Branch? 7.3
Bug fix? yes
New feature? yes
Deprecations? no
Issues Fix #57906
License MIT

Use plain text for key names when they are short enough.

It helps to understand where inserted locks come from when looking at the database.

See #57906 for examples of how the locks look like in the database.

Use plain text for key name when they are short enough.
It helps to understand where inserted locks come from when looking at the database.
@sylfabre
Copy link
Contributor Author

I'm not sure how to test this change, any feedback/tips are welcome!

@@ -48,8 +48,12 @@ private function init(array $options, float $gcProbability, int $initialTtl): vo
/**
* Returns a hashed version of the key.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be adjusted

@stof
Copy link
Member

stof commented May 24, 2025

This creates collisions for keys, as a long key is not considered the same resource than its hash.

@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lock] MySQL reports deadlocks which are difficult to investigate
5 participants