Hi,
I’m running the following code on couchbase 2.5.1 and java sdk versions 1.3.2 and 1.4.2
bucket.couchbaseClient.set("incrementInt4", 4).get() mustEqual true
bucket.couchbaseClient.set("incrementInt", 3).get() mustEqual true
System.out.println(bucket.couchbaseClient.get("incrementInt4").toString)
System.out.println(bucket.couchbaseClient.get("incrementInt").toString)
//STRANGE incr does not seem to work, counter is not incremented
bucket.couchbaseClient.incr("incrementInt", 1)
System.out.println(bucket.couchbaseClient.get("incrementInt").toString)
Its scala, which explains the lack of ‘;’
I get the following output from the console
4
3
3
I would expect the last line to be 4. Also the incr returns -1, which means that the key did not exist, according to the reference documentation
In the ui for couchbase, the keys has the following values
incrementInt "Aw=="
incrementInt4 "BA=="
Why are the keys not stored as integers. I can’t get the above to make sense
Thanks
Niels