Inconsistency while writing and reading in quorum level.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Inconsistency while writing and reading in quorum level.

vijayakumar
Records inserted into a bucket are not reflected  when read in a different request while using java riak client (even when both read and write are in quorum level).

Code fragment for Write:
           Bucket bucket = <iRiakClient>.fetchBucket(table).execute();
            IRiakObject riakObject = RiakObjectBuilder.newBuilder(table,key).withValue(new JSONObject(valueMap).toString()).build();
            riakObject.setContentType("application/json");
            bucket.store(riakObject).dw(Quora.QUORUM).execute();
      

Code fragment for Read:
   Bucket bucket = <iRiakClient>.fetchBucket(table).execute();
   IRiakObject fetched = bucket.fetch(key).r(Quora.QUORUM).execute();

Number of nodes in riak-server-cluster:3
Riak Client Version : 1.4.0

All the default properties of  the buckets are retained as it is.

Am I missing anything else? Kindly help me out.


Regards,
Vijayakumar.




_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Inconsistency while writing and reading in quorum level.

Brian Roach-2
Vijayakumar,

I'm not able to reproduce any odd behavior using the same calls with a 3 node cluster and storing/retrieving a String (tested both HTTP and ProtocolBuffers). 

When you say "records are not reflected", what do you mean exactly?  

Is the value in your returned IRiakObject null (meaning the key was not found),  just an empty String / Byte[], or there's something there but it's not the value you expected?

Also, what release version of Riak are you using?

Thank You,
Brian Roach



On Feb 29, 2012, at 11:02 AM, vijayakumar wrote:

Records inserted into a bucket are not reflected  when read in a different request while using java riak client (even when both read and write are in quorum level).

Code fragment for Write:
           Bucket bucket = <iRiakClient>.fetchBucket(table).execute();
            IRiakObject riakObject = RiakObjectBuilder.newBuilder(table,key).withValue(new JSONObject(valueMap).toString()).build();
            riakObject.setContentType("application/json");
            bucket.store(riakObject).dw(Quora.QUORUM).execute();
      

Code fragment for Read:
   Bucket bucket = <iRiakClient>.fetchBucket(table).execute();
   IRiakObject fetched = bucket.fetch(key).r(Quora.QUORUM).execute();

Number of nodes in riak-server-cluster:3
Riak Client Version : 1.4.0

All the default properties of  the buckets are retained as it is.

Am I missing anything else? Kindly help me out.


Regards,
Vijayakumar.



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com