Open/close API and local gateway

When using local gateways and then closing an index, it removes the local
gateways for the index. This makes it impossible to open the index again,
as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the
cassandra gateway at Gist) as that doesn't depend on shard allocation for
its location. But it has been pointed out that if the local gateways didn't
get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

close and open should work with local gateway, the indices should not go away. I have a test for that and it verifies that after closing all nodes and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?
On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local gateways for the index. This makes it impossible to open the index again, as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the cassandra gateway at Gist) as that doesn't depend on shard allocation for its location. But it has been pointed out that if the local gateways didn't get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

No I can't, the ES code works perfect. It was my own code that was doing
it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over
capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index: 9
...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9] closing
index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster
state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0]
deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9]
deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0]
state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0]
recalculating shard indexing buffer (reason=removed_shard[9][0]), total is
[101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9]
cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1] closing
index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster
state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

close and open should work with local gateway, the indices should not go
away. I have a test for that and it verifies that after closing all nodes
and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local
gateways for the index. This makes it impossible to open the index again,
as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the
cassandra gateway at Gist) as that doesn't depend on shard allocation for
its location. But it has been pointed out that if the local gateways didn't
get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

I did not understand your question. Are things working or not?
On Friday, December 10, 2010 at 12:50 AM, Matt Hartzler wrote:

No I can't, the ES code works perfect. It was my own code that was doing it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index: 9 ...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing [close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9] closing index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0] deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9] deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0] state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0] recalculating shard indexing buffer (reason=removed_shard[9][0]), total is [101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9] cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing [close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing [close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1] closing index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing [close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing [routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing [routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.com wrote:

close and open should work with local gateway, the indices should not go away. I have a test for that and it verifies that after closing all nodes and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local gateways for the index. This makes it impossible to open the index again, as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the cassandra gateway at Gist) as that doesn't depend on shard allocation for its location. But it has been pointed out that if the local gateways didn't get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

It is not working. Here is the gist: demonstration of open/close API nuking local gateway index · GitHub

Sorry for the confusion, I was just having trouble tracking down what was
going wrong. Looks like once you create a new index, the closed index gets
deleted.

On Thu, Dec 9, 2010 at 9:29 PM, Shay Banon shay.banon@elasticsearch.comwrote:

I did not understand your question. Are things working or not?

On Friday, December 10, 2010 at 12:50 AM, Matt Hartzler wrote:

No I can't, the ES code works perfect. It was my own code that was doing
it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over
capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index:
9 ...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9]
closing index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster
state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0]
deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9]
deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0]
state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0]
recalculating shard indexing buffer (reason=removed_shard[9][0]), total is
[101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9]
cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1]
closing index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster
state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

close and open should work with local gateway, the indices should not go
away. I have a test for that and it verifies that after closing all nodes
and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local
gateways for the index. This makes it impossible to open the index again,
as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the
cassandra gateway at Gist) as that doesn't depend on shard allocation for
its location. But it has been pointed out that if the local gateways didn't
get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

Hey,

Found a bug in the close API, which might cause the data for that index to be wiped... . Fixed it in master, great for catching this!. Close API might cause index data to be wiped · Issue #560 · elastic/elasticsearch · GitHub.

-shay.banon
On Friday, December 10, 2010 at 7:05 PM, Matt Hartzler wrote:

It is not working. Here is the gist: demonstration of open/close API nuking local gateway index · GitHub

Sorry for the confusion, I was just having trouble tracking down what was going wrong. Looks like once you create a new index, the closed index gets deleted.

On Thu, Dec 9, 2010 at 9:29 PM, Shay Banon shay.banon@elasticsearch.com wrote:

I did not understand your question. Are things working or not?

On Friday, December 10, 2010 at 12:50 AM, Matt Hartzler wrote:

No I can't, the ES code works perfect. It was my own code that was doing it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index: 9 ...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing [close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9] closing index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0] deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9] deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0] state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0] recalculating shard indexing buffer (reason=removed_shard[9][0]), total is [101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9] cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing [close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing [close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1] closing index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing [reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing [close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing [routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing [routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.com wrote:

close and open should work with local gateway, the indices should not go away. I have a test for that and it verifies that after closing all nodes and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local gateways for the index. This makes it impossible to open the index again, as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the cassandra gateway at Gist) as that doesn't depend on shard allocation for its location. But it has been pointed out that if the local gateways didn't get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

Even with your fix, Matt's repro still fails the same way if
index.store.type is set to memory.

I'm pretty sure that's supposed to work: the gateway has a persistent copy
of the index and the index should be restored from the gateway when it's
opened. It works fine if the gateway is fs, but not local.

I.e., it still fails with this elasticsearch.yml:

network:
tcp:
keep_alive: true
host: 127.0.0.1

cluster:
name: development

gateway:
type: local

index:
store:
type: memory
number_of_shards: 1
number_of_replicas: 0
robin:
refreshInterval: -1

Tom

On Fri, Dec 10, 2010 at 12:20 PM, Shay Banon
shay.banon@elasticsearch.comwrote:

Hey,

Found a bug in the close API, which might cause the data for that index
to be wiped... . Fixed it in master, great for catching this!.
Close API might cause index data to be wiped · Issue #560 · elastic/elasticsearch · GitHub.

-shay.banon

On Friday, December 10, 2010 at 7:05 PM, Matt Hartzler wrote:

It is not working. Here is the gist: demonstration of open/close API nuking local gateway index · GitHub

Sorry for the confusion, I was just having trouble tracking down what was
going wrong. Looks like once you create a new index, the closed index gets
deleted.

On Thu, Dec 9, 2010 at 9:29 PM, Shay Banon shay.banon@elasticsearch.comwrote:

I did not understand your question. Are things working or not?

On Friday, December 10, 2010 at 12:50 AM, Matt Hartzler wrote:

No I can't, the ES code works perfect. It was my own code that was doing
it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over
capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index:
9 ...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9]
closing index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster
state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0]
deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9]
deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0]
state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0]
recalculating shard indexing buffer (reason=removed_shard[9][0]), total is
[101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9]
cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1]
closing index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster
state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

close and open should work with local gateway, the indices should not go
away. I have a test for that and it verifies that after closing all nodes
and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local
gateways for the index. This makes it impossible to open the index again,
as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the
cassandra gateway at Gist) as that doesn't depend on shard allocation for
its location. But it has been pointed out that if the local gateways didn't
get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!

If index.store.type is set to memory, then you can't restore the state of
it after restart when using local gateway.

On Wednesday, December 15, 2010 at 2:52 AM, Tom May wrote:

Even with your fix, Matt's repro still fails the same way if
index.store.type is set to memory.

I'm pretty sure that's supposed to work: the gateway has a persistent copy
of the index and the index should be restored from the gateway when it's
opened. It works fine if the gateway is fs, but not local.

I.e., it still fails with this elasticsearch.yml:

network:
tcp:
keep_alive: true
host: 127.0.0.1

cluster:
name: development

gateway:
type: local

index:
store:
type: memory
number_of_shards: 1
number_of_replicas: 0
robin:
refreshInterval: -1

Tom

On Fri, Dec 10, 2010 at 12:20 PM, Shay Banon
shay.banon@elasticsearch.comwrote:

Hey,

Found a bug in the close API, which might cause the data for that index
to be wiped... . Fixed it in master, great for catching this!.
https://github.com/elasticsearch/elasticsearch/issues/issue/560/.

-shay.banon

On Friday, December 10, 2010 at 7:05 PM, Matt Hartzler wrote:

It is not working. Here is the gist: https://gist.github.com/736467

Sorry for the confusion, I was just having trouble tracking down what was
going wrong. Looks like once you create a new index, the closed index gets
deleted.

On Thu, Dec 9, 2010 at 9:29 PM, Shay Banon shay.banon@elasticsearch.comwrote:

I did not understand your question. Are things working or not?

On Friday, December 10, 2010 at 12:50 AM, Matt Hartzler wrote:

No I can't, the ES code works perfect. It was my own code that was doing
it. Now I feel sheepish. Well good news, thats much simpler to work with!

I am using a NodeAdminClient to close the indexes from a node.

admin.indices().prepareClose(index).execute().actionGet();

I just want to simulate sending a "POST /index/_close" ...

however when i run that i get:

[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] LruCache over
capacity: 1 removing: 9
[2010-12-09 16:44:41,546][DEBUG][client.node.lru ] Closing index: 9
...
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: execute
[2010-12-09 16:44:41,546][INFO ][cluster.metadata ] [N0] [9] closing
index
[2010-12-09 16:44:41,546][DEBUG][cluster.service ] [N0] cluster
state updated, version [143], source [close-index [9]]
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:44:41,547][DEBUG][indices.cluster ] [N0] [9][0]
deleting shard
[2010-12-09 16:44:41,547][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:44:41,547][DEBUG][index.service ] [N0] [9]
deleting shard_id [0]
[2010-12-09 16:44:41,548][DEBUG][index.shard.service ] [N0] [9][0]
state: [STARTED]->[CLOSED]
[2010-12-09 16:44:41,549][DEBUG][indices.memory ] [N0]
recalculating shard indexing buffer (reason=removed_shard[9][0]), total is
[101.9mb] with [1] shards, each shard set to [101.9mb]
[2010-12-09 16:44:41,550][DEBUG][indices.cluster ] [N0] [9]
cleaning index (no shards allocated)
[2010-12-09 16:44:41,551][DEBUG][cluster.service ] [N0] processing
[close-index [9]]: done applying updated cluster_state
[

instead of just

[2010-12-09 16:45:00,493][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: execute
[2010-12-09 16:45:00,493][INFO ][cluster.metadata ] [N0] [1] closing
index
[2010-12-09 16:45:00,494][DEBUG][cluster.service ] [N0] cluster
state updated, version [144], source [close-index [1]]
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: execute
[2010-12-09 16:45:00,495][DEBUG][river.cluster ] [N0] processing
[reroute_rivers_node_changed]: no change in cluster_state
[2010-12-09 16:45:00,495][DEBUG][cluster.service ] [N0] processing
[close-index [1]]: done applying updated cluster_state
[2010-12-09 16:45:00,496][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: execute
[2010-12-09 16:45:00,497][DEBUG][cluster.service ] [N0] processing
[routing-table-updater]: no change in cluster_state

when i use curl (no deletes). any hints?

On Thu, Dec 9, 2010 at 2:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

close and open should work with local gateway, the indices should not go
away. I have a test for that and it verifies that after closing all nodes
and reopening them should bring back the index in the same state.

Can you maybe gist the steps you do to recreate it?

On Thursday, December 9, 2010 at 9:34 PM, Matt Hartzler wrote:

When using local gateways and then closing an index, it removes the local
gateways for the index. This makes it impossible to open the index again,
as the data is gone. Is this the intended behavior?

The work around is to use a shared gateway (thus our implementing the
cassandra gateway at Gist) as that doesn't depend on shard allocation for
its location. But it has been pointed out that if the local gateways didn't
get destroyed on close and reshuffled on re-open that would be just as good.

Thanks!