In short, not really. Solr is at best near realtime (NRT). By default, it takes 
Solr one second to soft commit the value to its index. This timing can be 
lowered, but note that the lower the number, the more it impacts overall system 
performance. One second is the general top speed, but feel free t experiment. 
You can read a bit more about NRT here 
https://cwiki.apache.org/confluence/display/solr/Near+Real+Time+Searching

Eric


On Jul 29, 2014, at 2:24 PM, Jason W <jason.w.p...@gmail.com> wrote:

> Thanks Joseph and Sean!
> I did give it a quick try with override approach, then 'riak-admin 
> ensemble-status' did return enabled/active...but when I try to insert a new 
> entry the server just crashed.  After few trials and server restart, the 
> setting somehow got auto reverted back.  Now I am back w/ non-consistent 
> bucket type and it works fine. 
> 
> One thing that I did notice is that when I insert an entry into a bucket 
> through java client, I can see the new entry in the bucket through http curl 
> cmd immediately, BUT not getting the newly entry key/id through solr query.  
> I wonder if there is a setting that I can tune to sorta of make the solr 
> indexing real-time?  Thanks.
> 
> 
> On Mon, Jul 28, 2014 at 8:52 PM, Sean Cribbs <s...@basho.com> wrote:
> Furthermore, you should almost never use the 'ASIS' option. It does not mean 
> what you think it means (and probably means nothing to strong consistency).
> 
> 
> On Mon, Jul 28, 2014 at 6:55 PM, Joseph Blomstedt <j...@basho.com> wrote:
> This means the consistency sub-system is not enabled/active. You can
> verify this with the output of `riak-admin ensemble-status`.
> 
> To enable strong consistency you must:
> 
> 1) Set 'strong_consistency = on' in riak.conf.
> 2) Have at least a 3 node cluster.
> 
> You can address #2 by setting up 3+ local developer nodes as detailed
> in the 5 minute tutorial:
> http://docs.basho.com/riak/2.0.0/quickstart
> 
> Alternatively, you can override the need for 3 nodes and use 1 node.
> 
> To do that,
> 
> 1) Run 'riak attach' to attach to your Riak's node console
> 2) Enter (including the period): riak_ensemble_manager:enable().
> 3) Enter (including the period): riak_core_ring_manager:force_update().
> 3) Detach from the console using: Ctrl-C a
> 
> After either approach, re-check `riak-admin ensemble-status`. It may
> take up to a minute for the consistency sub-system to be enabled.
> 
> If you haven't already, please take a look at the temporary (until we
> finish updating docs.basho.com) strong consistency related
> documentation (linked from the 2.0 RC1 release notes) here:
> https://github.com/basho/riak_ensemble/blob/wip/riak-2.0-user-docs/riak_consistent_user_docs.md
> 
> Regards,
> Joe
> 
> On Mon, Jul 28, 2014 at 3:05 PM, Jason W <jason.w.p...@gmail.com> wrote:
> > Hi,
> >
> > I am trying out 2.0 w/ just one local node, created a strongly consistent
> > bucket type.  But keep getting below exception.  If I just use the default
> > bucket type, everything works fine.  Here is the bucket type detail with
> > consistency bit on.
> >
> > young_vclock: 20
> > w: quorum
> > small_vclock: 50
> > rw: quorum
> > r: quorum
> > pw: 0
> > precommit: []
> > pr: 0
> > postcommit: []
> > old_vclock: 86400
> > notfound_ok: true
> > n_val: 1
> > linkfun: {modfun,riak_kv_wm_link_walker,mapreduce_linkfun}
> > last_write_wins: false
> > dw: quorum
> > dvv_enabled: true
> > chash_keyfun: {riak_core_util,chash_std_keyfun}
> > big_vclock: 50
> > basic_quorum: false
> > allow_mult: true
> > consistent: true
> > active: true
> > claimant: 'riak@0.0.0.0'
> >
> > Here is the java code
> >
> > List<String> addresses = new LinkedList<String>();
> >
> > addresses.add("172.16.0.254");
> >
> > RiakClient  riakClient = RiakClient.newClient(addresses);
> >
> > try {
> >
> > Location wildeGeniusQuote = new Location(new
> > Namespace("strongly_consistent2", "sample"), emp.getId());
> >
> > BinaryValue text =
> > BinaryValue.create(objectMapper.writeValueAsBytes(sampleObj));
> >
> > RiakObject obj = new RiakObject()
> >
> >         .setContentType("text/plain")
> >
> >         .setValue(text);
> >
> > StoreValue store = new
> > StoreValue.Builder(obj).withLocation(wildeGeniusQuote)
> >
> > .withOption(Option.ASIS, true)
> >
> > .withOption(Option.DW, new Quorum(1))
> >
> > .withOption(Option.IF_NONE_MATCH, true)
> >
> > .withOption(Option.IF_NOT_MODIFIED, true)
> >
> > .withOption(Option.PW, new Quorum(1))
> >
> > .withOption(Option.N_VAL, 1)
> >
> > .withOption(Option.RETURN_BODY, true)
> >
> > .withOption(Option.RETURN_HEAD, true)
> >
> > .withOption(Option.SLOPPY_QUORUM, true)
> >
> > .withOption(Option.TIMEOUT, 1000)
> >
> > .withOption(Option.W, new Quorum(1))
> >
> > .build();
> >
> > riakClient.execute(store);
> >
> > } catch (Exception e) {
> >
> > e.printStackTrace();
> >
> > return null;
> >
> > }
> >
> > Am I still missing something? Thanks.
> >
> >
> >
> > Caused by: com.basho.riak.client.core.netty.RiakResponseException:
> > unavailable
> >
> > at
> > com.basho.riak.client.core.netty.RiakResponseHandler.channelRead(RiakResponseHandler.java:52)
> >
> > at
> > io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:340)
> >
> > at
> > io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:326)
> >
> > at
> > io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:155)
> >
> > at
> > io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
> >
> > at
> > io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:340)
> >
> > at
> > io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:326)
> >
> > at
> > io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
> >
> > at
> > io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:116)
> >
> > at
> > io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:494)
> >
> > at
> > io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
> >
> > at
> > io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
> >
> > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
> >
> > at
> > io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
> >
> > ... 1 more
> >
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> >
> 
> 
> 
> --
> Joseph Blomstedt <j...@basho.com>
> Principal Engineer
> Basho Technologies, Inc.
> http://www.basho.com/
> 
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 
> 
> 
> -- 
> Sean Cribbs <s...@basho.com>
> Software Engineer
> Basho Technologies, Inc.
> http://basho.com/
> 
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to