Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.0.0
-
None
-
None
Description
Steps to reproduce:
public class Demo {
public static void main(String[] args) {
CouchbaseEnvironment env = DefaultCouchbaseEnvironment.builder()
.kvTimeout(100)
.bootstrapCarrierEnabled(false)
.bootstrapHttpEnabled(true)
.build();
Cluster cluster = CouchbaseCluster.create(env);
Bucket bucket = cluster.openBucket("default");
bucket.upsert(JsonDocument.create("foo", JsonObject.create().put("foo", "bar")));
long sleepMillis = 1000;
while (true) {
try
catch (Exception e)
{ e.printStackTrace(); } }
}
}
The class above runs infite requests to the cluster. After some time we are stopping the cluster and then restarting it.
Observed behaviour:
1) After restoring connection, the library starts complaining that it cannot decode the value because of broken flags.
2) Everything is clear on wires: i.e. flags 0x02000000 as expected
3) In the library flags are 2065852015 (or 7b22666f in hex), which is {"fo in ascii and clearly says that the library is trying to interpret value as flags
The problem:
The extras ByteBuf was not properly refcounted