I'm currently working with jruby and the java elasticsearch api. To ensure
a clean index for every testcase, I delete, create and refresh the index
before every test.
This work's most of the time but sometimes I get the following exception:
to execute phase [query_fetch], total failure; shardFailures
{[na][memento_test][0]: No active shards}
What I'm doing is basically:
def reset(index_name)
client.prepare_delete(index_name).execute.action_get
client.prepare_create(index_name).execute.action_get
client.prepare_refresh(index_name).execute.action_get
end
Nothing fancy I guess...
I guess this is a timing problem but I currently can't think of a way to
work around this.
Any hints / best practices for these kind of test cleanups?
Le mardi 16 octobre 2012 16:38:12 UTC+2, Pascal Friederich a écrit :
Hi,
I'm currently working with jruby and the java elasticsearch api. To ensure
a clean index for every testcase, I delete, create and refresh the index
before every test.
This work's most of the time but sometimes I get the following exception:
to execute phase [query_fetch], total failure; shardFailures
{[na][memento_test][0]: No active shards}
What I'm doing is basically:
def reset(index_name)
client.prepare_delete(index_name).execute.action_get
client.prepare_create(index_name).execute.action_get
client.prepare_refresh(index_name).execute.action_get
end
Nothing fancy I guess...
I guess this is a timing problem but I currently can't think of a way to
work around this.
Any hints / best practices for these kind of test cleanups?
Le mardi 16 octobre 2012 16:38:12 UTC+2, Pascal Friederich a écrit :
Hi,
I'm currently working with jruby and the java elasticsearch api. To
ensure a clean index for every testcase, I delete, create and refresh the
index before every test.
This work's most of the time but sometimes I get the following exception:
to execute phase [query_fetch], total failure; shardFailures
{[na][memento_test][0]: No active shards}
What I'm doing is basically:
def reset(index_name)
client.prepare_delete(index_name).execute.action_get
client.prepare_create(index_name).execute.action_get
client.prepare_refresh(index_name).execute.action_get
end
Nothing fancy I guess...
I guess this is a timing problem but I currently can't think of a way to
work around this.
Any hints / best practices for these kind of test cleanups?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.