if ttl field mappers don't exists (yet), ignore it for that shard
This commit is contained in:
parent
100df0dca8
commit
84ae001731
|
@ -135,6 +135,9 @@ public class IndicesTTLService extends AbstractLifecycleComponent<IndicesTTLServ
|
||||||
for (IndexService indexService : indicesService) {
|
for (IndexService indexService : indicesService) {
|
||||||
// should be optimized with the hasTTL flag
|
// should be optimized with the hasTTL flag
|
||||||
FieldMappers ttlFieldMappers = indexService.mapperService().name(TTLFieldMapper.NAME);
|
FieldMappers ttlFieldMappers = indexService.mapperService().name(TTLFieldMapper.NAME);
|
||||||
|
if (ttlFieldMappers == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// check if ttl is enabled for at least one type of this index
|
// check if ttl is enabled for at least one type of this index
|
||||||
boolean hasTTLEnabled = false;
|
boolean hasTTLEnabled = false;
|
||||||
for (FieldMapper ttlFieldMapper : ttlFieldMappers) {
|
for (FieldMapper ttlFieldMapper : ttlFieldMappers) {
|
||||||
|
|
Loading…
Reference in New Issue