mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
This at a very low rate and with the force merge in place before checking the cache size it's not clear why the cache is not of size `0` -> seems something else must be happening here that is unexpected. -> add debug logging to this test to find out Relates #46701
This commit is contained in:
parent
875d864be6
commit
ee4e6b1382
@ -62,6 +62,7 @@ import org.elasticsearch.test.ESIntegTestCase;
|
|||||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||||
|
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -1007,6 +1008,7 @@ public class IndexStatsIT extends ESIntegTestCase {
|
|||||||
assertEquals(total, shardTotal);
|
assertEquals(total, shardTotal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestLogging(value = "_root:DEBUG", reason = "https://github.com/elastic/elasticsearch/issues/46701")
|
||||||
public void testFilterCacheStats() throws Exception {
|
public void testFilterCacheStats() throws Exception {
|
||||||
Settings settings = Settings.builder().put(indexSettings())
|
Settings settings = Settings.builder().put(indexSettings())
|
||||||
.put("number_of_replicas", 0)
|
.put("number_of_replicas", 0)
|
||||||
@ -1064,11 +1066,14 @@ public class IndexStatsIT extends ESIntegTestCase {
|
|||||||
});
|
});
|
||||||
flush("index");
|
flush("index");
|
||||||
}
|
}
|
||||||
|
logger.info("--> force merging to a single segment");
|
||||||
ForceMergeResponse forceMergeResponse =
|
ForceMergeResponse forceMergeResponse =
|
||||||
client().admin().indices().prepareForceMerge("index").setFlush(true).setMaxNumSegments(1).get();
|
client().admin().indices().prepareForceMerge("index").setFlush(true).setMaxNumSegments(1).get();
|
||||||
assertAllSuccessful(forceMergeResponse);
|
assertAllSuccessful(forceMergeResponse);
|
||||||
|
logger.info("--> refreshing");
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
|
logger.info("--> verifying that cache size is 0");
|
||||||
response = client().admin().indices().prepareStats("index").setQueryCache(true).get();
|
response = client().admin().indices().prepareStats("index").setQueryCache(true).get();
|
||||||
assertCumulativeQueryCacheStats(response);
|
assertCumulativeQueryCacheStats(response);
|
||||||
assertThat(response.getTotal().queryCache.getHitCount(), greaterThan(0L));
|
assertThat(response.getTotal().queryCache.getHitCount(), greaterThan(0L));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user