set index definition to disabled after trying to shift an empty index

This commit is contained in:
Jörg Prante 2024-07-05 18:39:19 +02:00
parent d967d84cfd
commit b61ef22086
2 changed files with 4 additions and 2 deletions

View file

@ -352,9 +352,11 @@ public abstract class AbstractAdminClient extends AbstractBasicClient implements
} }
if (indexDefinition.isShiftEnabled()) { if (indexDefinition.isShiftEnabled()) {
if (indexDefinition.isShiftNotEmpty() && isIndexEmpty(indexDefinition)) { if (indexDefinition.isShiftNotEmpty() && isIndexEmpty(indexDefinition)) {
logger.log(Level.WARNING, "index is empty, deleting index and rejecting to continue shifting: " + logger.log(Level.WARNING, "index is empty, deleting index, disabling definition, rejecting to continue shifting: " +
indexDefinition); indexDefinition);
deleteIndex(indexDefinition); deleteIndex(indexDefinition);
indexDefinition.setEnabled(false);
indexDefinition.setPrune(false);
return new EmptyIndexShiftResult(); return new EmptyIndexShiftResult();
} }
if (indexDefinition.isCloseShifted()) { if (indexDefinition.isCloseShifted()) {

View file

@ -1,3 +1,3 @@
group = org.xbib group = org.xbib
name = elx name = elx
version = 7.10.2.46 version = 7.10.2.47