The problem: The snapshotting only happens when I shut down the node
that I am running and not every 30 secs, as I would expect from the
below configuration. Did I configure something incorrectly or am I not
understand when the snapshots would take place?
As a background, I am prototyping ES for use in our in-house CMS
application. So right now, ES is setup on only my laptop, which is
macbook with 2.26 Ghz core 2 duo with 4GB RAM. I am also using only
one node for indexing and searching.
You should only define the gateway type to fs on the gateway level, the
index level will automatically be FS. Also, the path should only be defined
on the gateway level, the index level will reuse it.
The snapshot interval is defined on the index.gateway level. Note, by
default, a time_value in elasticsearch is in milliseconds, so you need to
define 30s. Also, I am surprised that you say you did not see snapshotting
happen, since the default is 10s. Note, snapshot will only happen if there
are changes.
I removed the other settings that are the default, like snapshot on
close. Note, if you do want to set it, its also on the index.gateway level.
You set the number_of_shards and number_of_replicas. This means that
these are the default values now for any index created, unless explicitly
specified in the create index API. This applies to all index level settings.
The problem: The snapshotting only happens when I shut down the node
that I am running and not every 30 secs, as I would expect from the
below configuration. Did I configure something incorrectly or am I not
understand when the snapshots would take place?
As a background, I am prototyping ES for use in our in-house CMS
application. So right now, ES is setup on only my laptop, which is
macbook with 2.26 Ghz core 2 duo with 4GB RAM. I am also using only
one node for indexing and searching.
Thanks for the configuration. I see that snapshotting, just keeps
updating the segment_N and translog files. Shouldn't the segment.gen
and *.fdx and *.fdx files be backed up as well?
Correct me if I am wrong, so if I stop and start the search server the
whole index gets rebuilt from translog? For e.g:
You should only define the gateway type to fs on the gateway level, the
index level will automatically be FS. Also, the path should only be defined
on the gateway level, the index level will reuse it.
The snapshot interval is defined on the index.gateway level. Note, by
default, a time_value in elasticsearch is in milliseconds, so you need to
define 30s. Also, I am surprised that you say you did not see snapshotting
happen, since the default is 10s. Note, snapshot will only happen if there
are changes.
I removed the other settings that are the default, like snapshot on
close. Note, if you do want to set it, its also on the index.gateway level.
You set the number_of_shards and number_of_replicas. This means that
these are the default values now for any index created, unless explicitly
specified in the create index API. This applies to all index level settings.
The problem: The snapshotting only happens when I shut down the node
that I am running and not every 30 secs, as I would expect from the
below configuration. Did I configure something incorrectly or am I not
understand when the snapshots would take place?
As a background, I am prototyping ES for use in our in-house CMS
application. So right now, ES is setup on only my laptop, which is
macbook with 2.26 Ghz core 2 duo with 4GB RAM. I am also using only
one node for indexing and searching.
The translog is there so a flush (on elasticsearch terms, which maps to
performing Lucene commit) will not be needed to be performed for each
operation. By default, a flush is executed after 5000 docs have been added
to the translog, in which case a commit is done, and a new translog gets
created. Until then, there are no "new" files in the index, so they don't
get snapshotted to the gateway, only the translog.
So, to your question, at the upmost, only 5000 docs will need to be
reapplied to to a recovered shard from the gateway, not all the changes
done, and this is manageable.
Thanks for the configuration. I see that snapshotting, just keeps
updating the segment_N and translog files. Shouldn't the segment.gen
and *.fdx and *.fdx files be backed up as well?
Correct me if I am wrong, so if I stop and start the search server the
whole index gets rebuilt from translog? For e.g:
You should only define the gateway type to fs on the gateway level,
the
index level will automatically be FS. Also, the path should only be
defined
on the gateway level, the index level will reuse it.
The snapshot interval is defined on the index.gateway level. Note, by
default, a time_value in elasticsearch is in milliseconds, so you need to
define 30s. Also, I am surprised that you say you did not see
snapshotting
happen, since the default is 10s. Note, snapshot will only happen if
there
are changes.
I removed the other settings that are the default, like snapshot on
close. Note, if you do want to set it, its also on the index.gateway
level.
You set the number_of_shards and number_of_replicas. This means that
these are the default values now for any index created, unless explicitly
specified in the create index API. This applies to all index level
settings.
The problem: The snapshotting only happens when I shut down the node
that I am running and not every 30 secs, as I would expect from the
below configuration. Did I configure something incorrectly or am I not
understand when the snapshots would take place?
As a background, I am prototyping ES for use in our in-house CMS
application. So right now, ES is setup on only my laptop, which is
macbook with 2.26 Ghz core 2 duo with 4GB RAM. I am also using only
one node for indexing and searching.
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.