Details
-
Bug
-
Resolution: Won't Fix
-
Critical
-
None
-
1.2.2
-
Security Level: Public
-
None
-
- Centos 6.5 X86_64
- PHP 5.5.12
- libcouchbase version => 2.3.1
Description
I'm planning to use Couchbase as a PHP session storage. In the current test setup I've two Couchbase nodes with one node in "Down" state. The data isn't rebalanced yet.
Unfortunately the array which is returned in the getReplica() in unpredictable. The function array_key_exists() return sometimes bool(true) - the expected value - but sometimes the value is bool(false).
An example of the implementation is added:
PHP snippet:
==========
<?php
class CouchbaseSessionHandler implements SessionHandlerInterface
{
public function read($id)
{
try
catch (CouchbaseLibcouchbaseException $ex) {
try
catch (CouchbaseLibcouchbaseException $ex)
{ return null; } }
}
}
Output (the unexpected one):
=====================
string(26) "do8uaf0omfsjframmu95cc1dm1"
array(1) { ["do8uaf0omfsjframmu95cc1dm1"]=> array(2)
" } }
bool(true)
bool(false)