Closed
Description
Elasticsearch version (bin/elasticsearch --version
): Version: 7.7.0, Build: default/tar/81a1e9eda8e6183f5237786246f6dced26a10eaf/2020-05-12T02:01:37.602180Z, JVM: 14
Plugins installed: [] None
JVM version (java -version
): Included
OS version (uname -a
if on a Unix-like system): Linux moloches01 3.10.0-1062.12.1.el7.YAHOO.20200205.52.x86_64 #1 SMP Wed Feb 5 22:45:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
7.7.0 seems to no longer wait for idle shards to be refreshed before responding to a _search query. 7.6.2 and previous versions did not have this issue.
- So I have a index (dstats_v4) that I constantly overwrite documents in (1440 documents per moloch node, written every 5 seconds, wrapping around so always the same doc ids are used)
- It does NOT have a refresh_interval set, so it should be taking advantage of the idle shard feature (https://www.elastic.co/guide/en/elasticsearch/reference/7.7/index-modules.html#dynamic-index-settings)
- If we wait to search this index for a long period of time and then do a search, only some of the documents we know are there are returned. so if we a _search?q=molochnode:test we should ALWAYS get 1440 documents, but we randomly get around 600-800, it almost looks like every other document is returned so it is NOT just the documents written during the period of not searching. (I wondering if there is some idle + # of shards issue here, since we are using 2 shards)
- If we repeat the search several times eventually it will return all 1440 documents and then will keep working
- As a work around Mark had as set refresh_interval to 1s and that always works, even after wait a long period of time
Here is our _settings
"dstats_v4" : {
"settings" : {
"index" : {
"number_of_shards" : "2",
"auto_expand_replicas" : "0-3",
"provided_name" : "dstats_v4",
"creation_date" : "1565358628829",
"priority" : "50",
"number_of_replicas" : "3",
"uuid" : "muB0pZV4SYywXmxBcJEEGA",
"version" : {
"created" : "6080299",
"upgraded" : "7040299"
}
}
}
}
}```
**Steps to reproduce**:
Haven't been able to reproduce with standalone script yet