When I have an index with documnets and the _ttl set, and ES has been shut
down, and gets started again, the documents that have expired in the
meantime gets purged.
Where exactly in the source code happens this? I was searching for ages but
all I could find was the IndicesTTLService.java file but that one does not
seem to be the right place.
I suppose it happens somewhere in the recovery process.
I tried to figure out by setting log level to trace but that did not give
me the right place either.
Once a node starts, the IndicesTTLService is also started. The
IndicesTTLService
starts the PurgerThread thread that periodically deletes all expired
document for all indices that have a ttl configured. The deleting is
actually performed in the PurgerThread#purgeShards method.
If you set the 'indices.ttl' to 'DEBUG' in the logging.yml, you should see
the related log lines.
When I have an index with documnets and the _ttl set, and ES has been shut
down, and gets started again, the documents that have expired in the
meantime gets purged.
Where exactly in the source code happens this? I was searching for ages
but all I could find was the IndicesTTLService.java file but that one
does not seem to be the right place.
I suppose it happens somewhere in the recovery process.
I tried to figure out by setting log level to trace but that did not give
me the right place either.
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.