Closed mansoorghori closed 8 years ago
@mansoorghori I will look into this and get it resolved in the next few days. Thanks for bringing it to my attention.
@mansoorghori I completed a fix for v3 of the client, can you take a look and see if it fixes your needs. #114
@christophermancini Thanks for the update. I had a brief look at the pull request and it seems it might be what I need. I need to try it out. How do I get this WIP code?
You should be able to check it out via composer by using the branch name instead of the release version. Just prefix it with "dev-", e. g. dev-issue/113
The other options are to clone the repo and checkout the branch or navigate to the branch on GitHub and download a zip file of the code.
@christophermancini, I've checked the code fix and it works as expected. It tries all the nodes until it get's a response. Thanks.
Great! I am off the next few days, I will get a colleague to merge the PR and cut a release.
Hi
Trying to find out if it is possible to get all the keys for the stored objects within a bucket using the PHP client?
Regards
Mansoor Ghori On 9 Jan 2016 22:27, "Christopher Mancini" notifications@github.com wrote:
@mansoorghori https://github.com/mansoorghori I will look into this and get it resolved in the next few days. Thanks for bringing it to my attention.
— Reply to this email directly or view it on GitHub https://github.com/basho/riak-php-client/issues/113#issuecomment-170287657 .
Hi @mansoorghori ,
Currently it has not been implemented for PHP but has been for some of our other clients. List keys is an extremely expensive operation on the server side and paging of the result set is not something that has really been implemented Riak side, which is ultimately why I did not implement it in PHP. Some of the other languages can handle the result set a bit easier than PHP could since they are threaded.
I would recommend at least for now, that maybe you try to depend on Yokozuna (solr) to retrieve keys within a bucket as it is a much safer operation and currently supported.
If you truly need a full list keys, you could hit the HTTP interface directly using curl and it returns JSON so it should be fairly trivial to implement as a one off.
With the performance gains of PHP 7, it might be something that gets officially added when our PB dependency library supports PHP 7. Just for now, it doesn't seem like something that would add more value than headaches to support.
Chris
When there is multiple nodes configured for the client and one of the nodes is down the client does not appear to failover to a different node.
The code used to initialize the client is:
$riak_hosts is a comma-separated list, e.g. riak-host-1:8091,riak-host-2:8092,riak-host-3:8093
Now if one of these nodes is down and the client picks the node that is down, on connection failure it doesn't try another host to fulfil the request