Skip to content
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

update to mainstream #10

Merged
merged 22 commits into from Mar 22, 2017

Conversation

@mklooss
Copy link
Owner

commented Mar 22, 2017

No description provided.

colinmollenhour and others added 16 commits Oct 4, 2016
@Xon

This comment has been minimized.

Copy link
Contributor

commented on Cm/Cache/Backend/Redis.php in beee940 Mar 11, 2017

The sentinel client spec indicates you should check to see if the master you are attempting to talk to is actually a master.

This comment has been minimized.

Copy link
Owner Author

replied Mar 11, 2017

I know, that's why this feature is optional.. :)
If your system is generally very stable (I've run for over a year without restart) then the couple seconds of possible errors during a transition might be acceptable. Also if the cache is warm at the time of transition and there are no writes then reading from the wrong master is perfectly ok assuming it is up (which it probably isn't).

An improvement would probably be to contact the sentinel if the master was loaded from cache and the connection failed. This way if the old master went down you probably wouldn't be able to connect to it and then falling back to checking the sentinel would give you the correct result and the client would not receive an error, just a slight delay before the master times out.

This comment has been minimized.

Copy link
Owner Author

replied Mar 11, 2017

Well simply having APCu installed nearly doubles my page load time anyway... So this is a pretty useless optimization..

This comment has been minimized.

Copy link
Contributor

replied Mar 11, 2017

I found APCu can also introduce livelocks if a php-fpm worker process dies at the wrong time.

I then read how it did key expiry management and yuck. On every APCu function which touches keys; Linear lookup of keys, expire them as encountered on every access, inside a mutex which doesn't auto-release if the process dies.

@mklooss mklooss merged commit fc28b0c into mklooss:master Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.