PHP SDK intermittently returns no value for existing document during rebalance
During rebalance calling getMulti with the PHP SDK will return incomplete results without throwing an exception or setting an error.
This should *never* happen. If the SDK can't reach a node it should throw an exception.
PHP SDK 1.1 / CB Community 2.0
I don't have a need to rebalance presently. I don't want to initiate one at this time because I tend to get 502s quite a bit during rebalance (see my other post on the PHP SDK SIGALRMing during rebalance).
Are you saying that I may get a timeout error without an exception being raised? I'm getting 20 items at a time with getMulti and I've only seen one item missing at a time (three nodes) -- I don't think it's a timeout problem. Furthermore, the documentation for getMulti seems to indicate that the returned key/value pair will either be key/value or key/error rather than getMulti setting the general error code. I get no key returned at all.
I do agree, this should never happen. It could, in rare cases, hit a timeout condition.
This may happen during rebalance because that's when there is a lot more disk IO.
Can you turn up the timeout to see if it still occurs with a higher timeout? At the moment, the best way to check for an error is to do a check of getStatusCode() (full descriptions are available with getStatusMessage()). See the file couchbase-api.php included in the download or on github[1] for details on the code.
We're looking to come up with a better API here in a future release. The current one mostly mirrors pecl-memcached for compatibility.
1. https://github.com/couchbase/php-ext-couchbase/blob/master/example/couch...