I believe this error occurs when Riak erroneously cache a bad return value, ie a non-list/array. For now, the best I can offer is either to bounce the offending node or disable the cache.
--Kevin Sent from my iPhone On Nov 5, 2010, at 8:20 AM, Jan Metzner <[email protected]> wrote: > Hi kevin, > > thanks for the answer - is there a workaround for this and when will > this error occur? > > Thanks > Jan > > 2010/11/5 Kevin Smith <[email protected]>: >> Jan - >> >> This is a bug in the JS cache which will be fixed in the upcoming release. >> >> --Kevin >> >> Sent from my iPhone >> >> On Nov 5, 2010, at 12:33 AM, Jan Metzner <[email protected]> wrote: >> >>> Hi Folks, >>> >>> after importing a lot of data i fired some map reduce javascript >>> queries with some strange results. >>> I had a typo in the first query but the error from this query was also >>> returned for the other queries. >>> The queries were not made parallel and the error appears also in the log >>> files. >>> After restarting the riak server everything went to normal. >>> >>> Any chance how to avaoid there strange behaviour? >>> >>> Ciao Jan >>> >>> Here is the sequence from the riak log files: >>> >>> =ERROR REPORT==== 4-Nov-2010::16:16:20 === >>> ** State machine <0.19673.82> terminating >>> ** Last event in was inputs_done >>> ** When State == executing >>> ** Data == {state,3,riak_kv_reduce_phase, >>> {state, >>> {javascript, >>> {reduce, >>> {jsanon, >>> <<"function(values, arg){ var >>> pvalues=[]; for(var i = 0; i < values.length; i++){ if(values[i].id){ >>> if(values[i].wallpost){ pvalues[pvalues.length]=values[i]; } else >>> if(values[i].comments){ var addEve >>> nt = false; for(var c=0; c < values[i].comments.length; c++){ >>> if(values[i].comments[c].userId == '100000082183525'){addEvent=true;}} >>> if(addEvent){pvalues[pvalues.length]=values[i];} }} } return >>> pvalues.sort(function(a,b){ var autc=a.utc; >>> if(a.comments){for(var i=0; i< a.comments.length; i++){ var >>> cutc=a.comments[i].timestamp; autc=cutc > autc?cutc:autc;}} var >>> butc=b.utc; if(b.comments){for(var i=0; i< b.comments.length; i++){ >>> var cutc=b.comments[i].timestamp; butc=cutc > butc?cutc:butc;}} var >>> diff=autc-butc; return diff==0 ? 0 : diff > 0 ? -1 : 1; }); }">>}, >>> none,true}}, >>> [],[]}, >>> true,true,<0.19674.82>, >>> [<0.19674.82>], >>> undefined,0,<0.19672.82>,66000} >>> ** Reason for termination = >>> ** {error,[{<<"lineno">>,1}, >>> {<<"message">>,<<"TypeError: iv.values is undefined">>}, >>> {<<"source">>,<<"unknown">>}]} >>> >>> =ERROR REPORT==== 4-Nov-2010::16:17:07 === >>> ** State machine <0.20427.82> terminating >>> ** Last event in was inputs_done >>> ** When State == executing >>> ** Data == {state,3,riak_kv_reduce_phase, >>> {state, >>> {javascript, >>> {reduce, >>> {jsanon, >>> <<"function(values, arg){ var >>> pvalues=[]; for(var i = 0; i < values.length; i++){ if(values[i].id){ >>> if(values[i].wallpost){ pvalues[pvalues.length]=values[i]; } else >>> if(values[i].comments){ var addEvent = false; for(var c=0; c < >>> values[i].comments.length; c++){ if(values[i].comments[c].userId == >>> '100000082183525'){addEvent=true;}} >>> if(addEvent){pvalues[pvalues.length]=values[i];} }} } return >>> pvalues.sort(function(a,b){ var autc=a.utc; if(a.comments){for(var >>> i=0; i< a.comments.length; i++){ var cutc=a.comments[i].timestamp; >>> autc=cutc > autc?cutc:autc;}} var butc=b.utc; if(b.comments){for(var >>> i=0; i< b.comments.length; i++){ var cutc=b.comments[i].timestamp; >>> butc=cutc > butc?cutc:butc;}} var diff=autc-butc; return diff==0 ? 0 : >>> diff > 0 ? -1 : 1; }); }">>}, >>> none,true}}, >>> [],[]}, >>> true,true,<0.20428.82>, >>> [<0.20428.82>], >>> undefined,0,<0.20426.82>,66000} >>> ** Reason for termination = >>> ** {error,[{<<"lineno">>,1}, >>> {<<"message">>,<<"TypeError: iv.values is undefined">>}, >>> {<<"source">>,<<"unknown">>}]} >>> >>> _______________________________________________ >>> riak-users mailing list >>> [email protected] >>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
