Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
update to mainstream #10
…le sentinels for initial connection. Added support for loading from a single slave without Sentinel.
I know, that's why this feature is optional.. :)
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.
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.