# Clearing the gateway on 0.10.0

**URL:** <https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336>\
**Category:** Elasticsearch\
**Created:** [September 14, 2010, 11:02pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336 "2010-09-14T23:02:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [September 14, 2010, 11:02pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/1 "2010-09-14T23:02:16Z")

</div>

Still in dev mode, so am clearing my data semi-frequently.

I noticed that on 0.10.0, when I clear the gateway, nodes still come  
up and use their local work directories. Is this correct behavior? Not  
a big deal, but in order to clear the cluster state, I now need to  
clear the work directory from each node, as well as, the gateway  
data.

It's definitely debatable on what the correct behavior should be, but  
was curious if this was the intent.

Thanks,  
Paul

---

<div class="post-metadata">

**Author:** ![Pascal\_Christoph](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pascal_christoph/32/3318_2.png) [@Pascal\_Christoph](https://discuss.elastic.co/u/Pascal_Christoph)\
**Post date:** [September 15, 2010, 7:31am UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/2 "2010-09-15T07:31:26Z")

</div>

Hello Paul,

Am 15.09.2010 01:02 schrieb Paul:

> Still in dev mode, so am clearing my data semi-frequently.
> 
> I noticed that on 0.10.0, when I clear the gateway, nodes still come  
> up and use their local work directories. Is this correct behavior? Not

it is, as long as not all data\_nodes were shutdown. The gateway is just  
for "longtime persistency", needed in case of a _total_ breakdown of the  
cluster. As long as _at least one_ data\_node has the index mirrored  
locally (that is, it has its "running" index), all other nodes that may  
join will get the data from that node, shared through the network-layer.  
If all data\_nodes are down and if you then bring one up newly, even if  
there is a "local" index (Shay speaks of it as a _temporary_ directory  
), that index will be ignored and it is tried to load the shared gateway  
(if we are speaking of the usage of a shared\_filesystem, that is).

> a big deal, but in order to clear the cluster state, I now need to  
> clear the work directory from each node, as well as, the gateway  
> data.

need not. Just shutdown the cluster e.g. with:  
$ curl -XPOST '[http://localhost:9200/\_cluster/nodes/\_all/\_shutdown](http://localhost:9200/_cluster/nodes/_all/_shutdown)'

> It's definitely debatable on what the correct behavior should be, but  
> was curious if this was the intent.

it depends on the character of the gateway. The new "local"[1] gateway  
will act differently I am sure but not experienced yet.  
I am using ES version 0.9, but the behaviour should be the same on 0.10.

oo

[1][Gateway: a `local` gateway · Issue #343 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/343)

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [September 15, 2010, 3:10pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/3 "2010-09-15T15:10:55Z")

</div>

Hi Pascal,  
Should have been more clear on my steps.

1. Shutdown cluster
2. Clear gateway data
3. Start a node - I'd expect the node to start up empty, but instead  
loads indices from work directory, even though, gateway is empty.

Thanks

On Sep 15, 1:31 am, Pascal Christoph [christ...@hbz-nrw.de](mailto:christ...@hbz-nrw.de) wrote:

> Hello Paul,
> 
> Am 15.09.2010 01:02 schrieb Paul:
> 
> > Still in dev mode, so am clearing my data semi-frequently.
> 
> > I noticed that on 0.10.0, when I clear the gateway, nodes still come  
> > up and use their local work directories. Is this correct behavior? Not
> 
> it is, as long as not all data\_nodes were shutdown. The gateway is just  
> for "longtime persistency", needed in case of a _total_ breakdown of the  
> cluster. As long as _at least one_ data\_node has the index mirrored  
> locally (that is, it has its "running" index), all other nodes that may  
> join will get the data from that node, shared through the network-layer.  
> If all data\_nodes are down and if you then bring one up newly, even if  
> there is a "local" index (Shay speaks of it as a _temporary_ directory  
> ), that index will be ignored and it is tried to load the shared gateway  
> (if we are speaking of the usage of a shared\_filesystem, that is).
> 
> > a big deal, but in order to clear the cluster state, I now need to  
> > clear the work directory from each node, as well as, the gateway  
> > data.
> 
> need not. Just shutdown the cluster e.g. with:  
> $ curl -XPOST '[http://localhost:9200/\_cluster/nodes/\_all/\_shutdown](http://localhost:9200/_cluster/nodes/_all/_shutdown)'
> 
> > It's definitely debatable on what the correct behavior should be, but  
> > was curious if this was the intent.
> 
> it depends on the character of the gateway. The new "local"[1] gateway  
> will act differently I am sure but not experienced yet.  
> I am using ES version 0.9, but the behaviour should be the same on 0.10.
> 
> oo
> 
> [1][Gateway: a `local` gateway · Issue #343 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/343)

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [September 15, 2010, 3:38pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/4 "2010-09-15T15:38:06Z")

</div>

Hi Paul

> Should have been more clear on my steps.
> 
> 1. Shutdown cluster
> 2. Clear gateway data
> 3. Start a node - I'd expect the node to start up empty, but instead  
> loads indices from work directory, even though, gateway is empty.

Are you using 0.10.0 or master?

clint

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 15, 2010, 6:53pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/5 "2010-09-15T18:53:14Z")

</div>

I think Paul said 0.10 in the first email. Paul, when you say clearning the  
gateway data, what exactly do you clean, I mean which directories? Do you  
also clear the metadata? If so, then no indices will be created since there  
is no metadata to reflect it that they ever existed in the gateway.

On Wed, Sep 15, 2010 at 5:38 PM, Clinton Gormley [clinton@iannounce.co.uk](mailto:clinton@iannounce.co.uk)wrote:

> Hi Paul
> 
> > Should have been more clear on my steps.
> > 
> > 1. Shutdown cluster
> > 2. Clear gateway data
> > 3. Start a node - I'd expect the node to start up empty, but instead  
> > loads indices from work directory, even though, gateway is empty.
> 
> Are you using 0.10.0 or master?
> 
> clint

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [September 15, 2010, 8:35pm UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/6 "2010-09-15T20:35:28Z")

</div>

In order to clear I am doing a rm -rf at the root of the gateway  
directory, which deletes the indices and metaindex directories.

I tried to recreate a minimal test w/ 1 index w/ 1 doc to reproduce  
and was not able to. This implies to me that something in my config or  
setup is off. I am using the Node client from an external app, so  
maybe that isn't shutting down and metadata is retained or something  
like that.

Anyway, I need to dig more to see what is up.

Thanks for the replies.

On Sep 15, 12:53 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> I think Paul said 0.10 in the first email. Paul, when you say clearning the  
> gateway data, what exactly do you clean, I mean which directories? Do you  
> also clear the metadata? If so, then no indices will be created since there  
> is no metadata to reflect it that they ever existed in the gateway.
> 
> On Wed, Sep 15, 2010 at 5:38 PM, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk)wrote:
> 
> > Hi Paul
> 
> > > Should have been more clear on my steps.
> 
> > > 1. Shutdown cluster
> > > 2. Clear gateway data
> > > 3. Start a node - I'd expect the node to start up empty, but instead  
> > > loads indices from work directory, even though, gateway is empty.
> 
> > Are you using 0.10.0 or master?
> 
> > clint

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:19am UTC](https://discuss.elastic.co/t/clearing-the-gateway-on-0-10-0/3336/7 "2017-07-06T04:19:17Z")

</div>

Closed on July 6, 2017, 4:19am UTC


