我有一个启用了搜索的 riak 存储桶。大多数情况下,它似乎工作得相当好,但对于某些资源,它现在失败了。我看不到失败的资源有什么特别之处。
这是我得到的一个真正的例外:
>>> key = '/data/v2/search_show/TMS.Person.1485'
>>> item = b.get(key)
>>> item.get_data()
{u'type': u'person', u'expires': u'9999999999', u'subject_name': u'Paul Rodriguez', u'sub_type': u'__None__', u'topic': u'__ref--/data/v2/topic/TMS.Person.1485:r1382637028.194730', u'person': u'__None__', u'searchable_key': u'rodriguez paulrodriguez paul', u'date': u'0000-00-00', u'sport': u'__None__', u'genre': u'__None__', u'id': u'/data/v2/search_show/TMS.Person.1485'}
>>> item.get_siblings()
[]
>>> item.store()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/riak/riak_object.py", line 438, in store
if_none_match=if_none_match)
File "/usr/local/lib/python2.7/dist-packages/riak/transports/http.py", line 173, in put
key=robj.get_key())
File "/usr/local/lib/python2.7/dist-packages/riak/transports/http.py", line 182, in do_put
return self.parse_body(response, [200, 201, 300])
File "/usr/local/lib/python2.7/dist-packages/riak/transports/http.py", line 383, in parse_body
self.check_http_code(response, expected_statuses)
File "/usr/local/lib/python2.7/dist-packages/riak/transports/http.py", line 369, in check_http_code
(expected_statuses, status, response[1]))
Exception: Expected status [200, 201, 300], received 500 : <html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>The server encountered an error while processing this request:<br><pre>{error,
{error,badarg,
[{erlang,iolist_to_binary,
[{hook_crashed,
{riak_search_kv_hook,precommit,error,
{badmatch,
[{{dict,3,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],
[[<<"X-Riak-VTag">>,51,57,117,77,117,89,54,
81,83,81,89,67,98,52,84,80,86,50,99,115,
55,116]],
[[<<"index">>]],
[],
[[<<"X-Riak-Last-Modified">>|
{1382,637028,329550}]],
[],[]}}},
{riak_idx_doc,<<"ctv_tvdata">>,
<<"/data/v2/search_show/TMS.Person.1485">>,
[{<<"date">>,<<"0000-00-00">>,
[{<<"0000-00-00">>,[0]}]},
{<<"expires">>,<<"9999999999">>,
[{<<"9999999999">>,[0]}]},
{<<"genre">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"id">>,
<<"/data/v2/search_show/TMS.Person.1485">>,
[{<<"/data/v2/search_show/TMS.Person.1485">>,
[0]}]},
{<<"person">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"searchable_key">>,
<<"rodriguez paulrodriguez paul">>,
[{<<"paulrodriguez">>,[1]},
{<<"paul">>,[2]},
{<<"rodriguez">>,[0]}]},
{<<"sport">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"sub_type">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"subject_name">>,<<"Paul Rodriguez">>,
[{<<"Paul">>,[0]},{<<"Rodriguez">>,[1]}]},
{<<"topic">>,
<<"__ref--/data/v2/topic/TMS.Person.1485:r1382637028.194730">>,
[{<<"__ref--/data/v2/topic/TMS.Person.1485:r1382637028.194730">>,
[0]}]},
{<<"type">>,<<"person">>,
[{<<"person">>,[0]}]}],
[],
[{<<"expires">>,<<"9999999999">>,
[<<"9999999999">>]},
{<<"type">>,<<"person">>,[<<"person">>]}],
true}},
{{dict,3,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],
[[<<"X-Riak-VTag">>,113,51,102,55,90,82,113,
56,73,51,90,69,116,53,115,68,51,49,52,75,
115]],
[[<<"index">>]],
[],
[[<<"X-Riak-Last-Modified">>|
{1382,637028,329664}]],
[],[]}}},
{riak_idx_doc,<<"ctv_tvdata">>,
<<"/data/v2/search_show/TMS.Person.1485">>,
[{<<"date">>,<<"0000-00-00">>,
[{<<"0000-00-00">>,[0]}]},
{<<"expires">>,<<"9999999999">>,
[{<<"9999999999">>,[0]}]},
{<<"genre">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"id">>,
<<"/data/v2/search_show/TMS.Person.1485">>,
[{<<"/data/v2/search_show/TMS.Person.1485">>,
[0]}]},
{<<"person">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"searchable_key">>,
<<"rodriguez paulrodriguez paul">>,
[{<<"paulrodriguez">>,[1]},
{<<"paul">>,[2]},
{<<"rodriguez">>,[0]}]},
{<<"sport">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"sub_type">>,<<"__None__">>,
[{<<"__None__">>,[0]}]},
{<<"subject_name">>,<<"Paul Rodriguez">>,
[{<<"Paul">>,[0]},{<<"Rodriguez">>,[1]}]},
{<<"topic">>,
<<"__ref--/data/v2/topic/TMS.Person.1485:r1382637028.194730">>,
[{<<"__ref--/data/v2/topic/TMS.Person.1485:r1382637028.194730">>,
[0]}]},
{<<"type">>,<<"person">>,
[{<<"person">>,[0]}]}],
[],
[{<<"expires">>,<<"9999999999">>,
[<<"9999999999">>]},
{<<"type">>,<<"person">>,[<<"person">>]}],
true}}]}}}],
[]},
{wrq,append_to_response_body,2,[{file,"src/wrq.erl"},{line,210}]},
{riak_kv_wm_object,handle_common_error,3,
[{file,"src/riak_kv_wm_object.erl"},{line,1046}]},
{webmachine_resource,resource_call,3,
[{file,"src/webmachine_resource.erl"},{line,186}]},
{webmachine_resource,do,3,
[{file,"src/webmachine_resource.erl"},{line,142}]},
{webmachine_decision_core,resource_call,1,
[{file,"src/webmachine_decision_core.erl"},{line,48}]},
{webmachine_decision_core,accept_helper,1,
[{file,"src/webmachine_decision_core.erl"},{line,615}]},
{webmachine_decision_core,decision,1,
[{file,"src/webmachine_decision_core.erl"},{line,518}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>
任何人都知道什么会导致这样的事情?仅仅是数据损坏吗?