Orange-OpenSource / YACassandraPDO

Cassandra PDO Driver fork
Apache License 2.0
84 stars 32 forks source link

Use correct call in PDO_CASSANDRA_ATTR_RANDOMIZE #56

Closed Skunnyk closed 10 years ago

Skunnyk commented 10 years ago

Use setRandomize() call instead of setMaxConsecutiveFailures() in PDO_CASSANDRA_ATTR_RANDOMIZE case.

PDO_CASSANDRA_ATTR_RANDOMIZE doesn't works because it call the wrong thrift function.

Furthermore, I have a problem when I initialize a pdo connection with several servers, the driver always connect to the same "random" host. Randomize might be broken on thrift cpp side (lib/cpp/src/thrift/transport/TSocketPool.cpp, no salt initialisation ?), so random_shuffle always return the same result. Need to dig deeper though.

mlornac-orange commented 10 years ago

Thanks for the patch