Error on node shutdown Riak Cluster

2014-12-11 Thread Garrido
Hello, 

We detect in our cluster that some is wrong with that, when we shutdown a 
single node from the running cluster (bin/riak stop), the connections from the 
riak erlang client of remain nodes are disconnected, 

This is a log from riak console.log

2014-12-11 10:38:17.915 [error] <0.820.15> CRASH REPORT Process <0.820.15> with 
0 neighbours exited with reason: 
{throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},...]}
 in gen_server:terminate/6 line 747
2014-12-11 10:38:17.915 [error] <0.302.0> Supervisor riak_api_pb_sup had child 
undefined started with {riak_api_pb_server,start_link,undefined} at <0.820.15> 
exit with reason 
{throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},...]}
 in context child_terminated
2014-12-11 10:38:18.494 [error] <0.830.15> gen_server <0.830.15> terminated 
with reason: 
{throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},…]}

We are running riak with Legacy Search, and we use Riak 1.4.x

From our cluster this is the member status:

sh bin/riak-admin member-status
= Membership ==
Status RingPendingNode
---
valid  17.2%  --  'riak1@10.136.89.98'
valid  17.2%  --  'riak2@10.136.89.98'
valid  17.2%  --  'riak3@10.136.89.99'
valid  17.2%  --  'riak4@10.136.89.99'
valid  15.6%  --  'riak5@10.136.89.100'
valid  15.6%  --  'riak6@10.136.89.101'
---
Valid:6 / Leaving:0 / Exiting:0 / Joining:0 / Down:0

I hope you can help us with this, we use this in a production environment and 
for now we cannot migrate our system to riak 2.0 which is better, 

Thank you,



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


Re: Error on node shutdown Riak Cluster

2014-12-11 Thread Eric Redmond
Did you make a change to the index while the node was down? Have you tried 
anything else on the cluster, like running repair?

http://docs.basho.com/riak/latest/ops/running/recovery/repairing-indexes/#Repairing-Search-Indexes


On Dec 11, 2014, at 8:50 AM, Garrido  wrote:

> Hello, 
> 
> We detect in our cluster that some is wrong with that, when we shutdown a 
> single node from the running cluster (bin/riak stop), the connections from 
> the riak erlang client of remain nodes are disconnected, 
> 
> This is a log from riak console.log
> 
> 2014-12-11 10:38:17.915 [error] <0.820.15> CRASH REPORT Process <0.820.15> 
> with 0 neighbours exited with reason: 
> {throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},...]}
>  in gen_server:terminate/6 line 747
> 2014-12-11 10:38:17.915 [error] <0.302.0> Supervisor riak_api_pb_sup had 
> child undefined started with {riak_api_pb_server,start_link,undefined} at 
> <0.820.15> exit with reason 
> {throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},...]}
>  in context child_terminated
> 2014-12-11 10:38:18.494 [error] <0.830.15> gen_server <0.830.15> terminated 
> with reason: 
> {throw,{error,data_not_available,{<<"search">>,<<"type_profile">>,<<"notes">>}},[{riak_search_op_term,preplan,2,[{file,"src/riak_search_op_term.erl"},{line,49}]},{riak_search_op_scope,preplan,2,[{file,"src/riak_search_op_scope.erl"},{line,25}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op,'-preplan/2-lc$^0/1-0-',2,[{file,"src/riak_search_op.erl"},{line,30}]},{riak_search_op_intersection,preplan,2,[{file,"src/riak_search_op_intersecti..."},...]},…]}
> 
> We are running riak with Legacy Search, and we use Riak 1.4.x
> 
> From our cluster this is the member status:
> 
> sh bin/riak-admin member-status
> = Membership 
> ==
> Status RingPendingNode
> ---
> valid  17.2%  --  'riak1@10.136.89.98'
> valid  17.2%  --  'riak2@10.136.89.98'
> valid  17.2%  --  'riak3@10.136.89.99'
> valid  17.2%  --  'riak4@10.136.89.99'
> valid  15.6%  --  'riak5@10.136.89.100'
> valid  15.6%  --  'riak6@10.136.89.101'
> ---
> Valid:6 / Leaving:0 / Exiting:0 / Joining:0 / Down:0
> 
> I hope you can help us with this, we use this in a production environment and 
> for now we cannot migrate our system to riak 2.0 which is better, 
> 
> Thank you,
> 
> 
> 
> ___
> 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


Re: How to re-index bucket for Riak Search

2014-12-11 Thread Luke Bakken
Hi Jeffrey,

The process you outline is the current way to deal with schema
changes. I've escalated the need for a better solution since this has
been a common scenario.

--
Luke Bakken
Engineer / CSE
lbak...@basho.com


On Tue, Dec 9, 2014 at 5:29 PM, Jeffrey Peck  wrote:
> I have a bucket with about 5 million objects, associated with a search index. 
> I recently made a change to the schema and I would like Riak to re-index all 
> data in the bucket.
>
> Is this possible?
>
> This is not for production. I am just experimenting, so it is not a major 
> problem if I need to re-process everything, but I would like to know if there 
> is a more efficient way to do this.
>
> My guess would be to write a script that fetches objects from all keys in the 
> bucket and re-inserts those objects, triggering a re-index. However, it seems 
> like there should be a more efficient way.
>
> Thanks!
>
> - Chaim
> ___
> 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


Re: How to re-index bucket for Riak Search

2014-12-11 Thread Eric Redmond
There are two projects that are currently in the works to solve this problem:

https://github.com/basho/yokozuna/pull/439
https://github.com/basho/yokozuna/pull/427

They should both be delivered shortly.

Eric


On Dec 9, 2014, at 5:29 PM, Jeffrey Peck  wrote:

> I have a bucket with about 5 million objects, associated with a search index. 
> I recently made a change to the schema and I would like Riak to re-index all 
> data in the bucket.
> 
> Is this possible?
> 
> This is not for production. I am just experimenting, so it is not a major 
> problem if I need to re-process everything, but I would like to know if there 
> is a more efficient way to do this.
> 
> My guess would be to write a script that fetches objects from all keys in the 
> bucket and re-inserts those objects, triggering a re-index. However, it seems 
> like there should be a more efficient way.
> 
> Thanks!
> 
> - Chaim
> ___
> 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


Re: Cleaning old indexes

2014-12-11 Thread Luke Bakken
Hi Geoff,

Are you having issues removing the old "global" index? You should be
able to delete it this way:

curl -XDELETE riak-host:8098/search/index/global

> Is it safe to mess with anything within the Solr admin interface (is there a 
> possibility of corruption from Riak -> Solr, or vice versa)?

It's best to leave things alone in production as Riak expects to be
the sole source of control for Solr

--
Luke Bakken
Engineer / CSE
lbak...@basho.com


On Tue, Nov 18, 2014 at 3:36 AM, Geoff Garbers  wrote:
> Hey all.
>
> When our company started out with Riak, there were some choices made with
> regards to indexing that are now coming back to bite us. Currently,
> everything in our Riak cluster is being indexed (dynamicField * indexed as
> text_general).
>
> We've learnt a lot about Riak and Solr since then, and we're in the process
> now of trying to fix this; indexing the fields we need with the correct data
> type.
>
> Previously, we had a single search index (called "global") - and everything
> was indexed under this. This is now split out into separate indexes
> ("contacts", "lists", "messages", etc); and I've tried to re-index
> everything - but I don't seem to be able to get rid of the old indexes.
>
> There are a few things I've tried; and they don't seem to help:
>
> 1. Streaming all keys in all buckets, fetching the object, and then putting
> the object.
> 2. Streaming all keys in all buckets, fetching the object, deleting the
> object, and then putting the object back with the same key.
> 2. Unloading the core in the Solr admin interface (it seems like it gets
> re-populated by Riak again).
>
> In summary, this is what I'm struggling to understand:
>
> 1. Is it safe to mess with anything within the Solr admin interface (is
> there a possibility of corruption from Riak -> Solr, or vice versa)?
> 2. How do I go about cleaning out old index data, versus simply (what seems
> to be) creating new index data, without clearing out the old data?
>
> Any help will really be appreciated!
>
> Thanks,
> Geoff
>
> ___
> 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


Re: Cleaning old indexes

2014-12-11 Thread Geoff Garbers
Hey Luke.

There are actually some legacy items within Riak that still use the global
search index - so we haven't yet had a need to remove it. It's good to know
that there is a way to remove it though.

And just a side question - I take it you're able to remove a search index
even if there are still objects referencing it, correct?

Regards,
Geoff


Geoffrey Garbers
Senior Developer

[image: Total Send] 

Cell: +27 (0)766 476 920
Skype: geoff.garbers
ge...@totalsend.com
www.totalsend.com

 +1 347-431-0494 
 +44 (0)203 519 1082 
 +61 (0)3 9111 5760 
 +27 (0)21 200 6981 

On Thu, Dec 11, 2014 at 8:28 PM, Luke Bakken  wrote:

> Hi Geoff,
>
> Are you having issues removing the old "global" index? You should be
> able to delete it this way:
>
> curl -XDELETE riak-host:8098/search/index/global
>
> > Is it safe to mess with anything within the Solr admin interface (is
> there a possibility of corruption from Riak -> Solr, or vice versa)?
>
> It's best to leave things alone in production as Riak expects to be
> the sole source of control for Solr
>
> --
> Luke Bakken
> Engineer / CSE
> lbak...@basho.com
>
>
> On Tue, Nov 18, 2014 at 3:36 AM, Geoff Garbers 
> wrote:
> > Hey all.
> >
> > When our company started out with Riak, there were some choices made with
> > regards to indexing that are now coming back to bite us. Currently,
> > everything in our Riak cluster is being indexed (dynamicField * indexed
> as
> > text_general).
> >
> > We've learnt a lot about Riak and Solr since then, and we're in the
> process
> > now of trying to fix this; indexing the fields we need with the correct
> data
> > type.
> >
> > Previously, we had a single search index (called "global") - and
> everything
> > was indexed under this. This is now split out into separate indexes
> > ("contacts", "lists", "messages", etc); and I've tried to re-index
> > everything - but I don't seem to be able to get rid of the old indexes.
> >
> > There are a few things I've tried; and they don't seem to help:
> >
> > 1. Streaming all keys in all buckets, fetching the object, and then
> putting
> > the object.
> > 2. Streaming all keys in all buckets, fetching the object, deleting the
> > object, and then putting the object back with the same key.
> > 2. Unloading the core in the Solr admin interface (it seems like it gets
> > re-populated by Riak again).
> >
> > In summary, this is what I'm struggling to understand:
> >
> > 1. Is it safe to mess with anything within the Solr admin interface (is
> > there a possibility of corruption from Riak -> Solr, or vice versa)?
> > 2. How do I go about cleaning out old index data, versus simply (what
> seems
> > to be) creating new index data, without clearing out the old data?
> >
> > Any help will really be appreciated!
> >
> > Thanks,
> > Geoff
> >
> > ___
> > 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


Re: Cleaning old indexes

2014-12-11 Thread Eric Redmond
You can't remove an index if there is still a bucket referencing it via 
'search_index'. You must remove that property from every referring bucket first.

Eric



On Dec 11, 2014, at 10:54 AM, Geoff Garbers  wrote:

> Hey Luke.
> 
> There are actually some legacy items within Riak that still use the global 
> search index - so we haven't yet had a need to remove it. It's good to know 
> that there is a way to remove it though.
> 
> And just a side question - I take it you're able to remove a search index 
> even if there are still objects referencing it, correct?
> 
> Regards,
> Geoff
> 
> 
> Geoffrey Garbers
> Senior Developer
> 
> 
> 
> Cell: +27 (0)766 476 920
> Skype: geoff.garbers
> ge...@totalsend.com
> www.totalsend.com
> 
>  +1 347-431-0494
>  +44 (0)203 519 1082
>  +61 (0)3 9111 5760
>  +27 (0)21 200 6981
> 
> On Thu, Dec 11, 2014 at 8:28 PM, Luke Bakken  wrote:
> Hi Geoff,
> 
> Are you having issues removing the old "global" index? You should be
> able to delete it this way:
> 
> curl -XDELETE riak-host:8098/search/index/global
> 
> > Is it safe to mess with anything within the Solr admin interface (is there 
> > a possibility of corruption from Riak -> Solr, or vice versa)?
> 
> It's best to leave things alone in production as Riak expects to be
> the sole source of control for Solr
> 
> --
> Luke Bakken
> Engineer / CSE
> lbak...@basho.com
> 
> 
> On Tue, Nov 18, 2014 at 3:36 AM, Geoff Garbers  wrote:
> > Hey all.
> >
> > When our company started out with Riak, there were some choices made with
> > regards to indexing that are now coming back to bite us. Currently,
> > everything in our Riak cluster is being indexed (dynamicField * indexed as
> > text_general).
> >
> > We've learnt a lot about Riak and Solr since then, and we're in the process
> > now of trying to fix this; indexing the fields we need with the correct data
> > type.
> >
> > Previously, we had a single search index (called "global") - and everything
> > was indexed under this. This is now split out into separate indexes
> > ("contacts", "lists", "messages", etc); and I've tried to re-index
> > everything - but I don't seem to be able to get rid of the old indexes.
> >
> > There are a few things I've tried; and they don't seem to help:
> >
> > 1. Streaming all keys in all buckets, fetching the object, and then putting
> > the object.
> > 2. Streaming all keys in all buckets, fetching the object, deleting the
> > object, and then putting the object back with the same key.
> > 2. Unloading the core in the Solr admin interface (it seems like it gets
> > re-populated by Riak again).
> >
> > In summary, this is what I'm struggling to understand:
> >
> > 1. Is it safe to mess with anything within the Solr admin interface (is
> > there a possibility of corruption from Riak -> Solr, or vice versa)?
> > 2. How do I go about cleaning out old index data, versus simply (what seems
> > to be) creating new index data, without clearing out the old data?
> >
> > Any help will really be appreciated!
> >
> > Thanks,
> > Geoff
> >
> > ___
> > 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

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