diff --git a/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java b/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java index 34886a6fb..3aed875a0 100644 --- a/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java +++ b/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java @@ -165,8 +165,8 @@ public class IndexCache if (oldIndexMap.get(newIndexRecord.name) != newIndexRecord.lastModifiedTime) { // update operation updated = true; + evictFromCache(newIndexRecord); if (newIndexRecord.isAutoloadEnabled()) { - evictFromCache(newIndexRecord); preloadIndex(newIndexRecord); LOG.debug("Index {%s} has been updated in cache.", newIndexRecord); }