Hello everyone,
with the latest Jira 8.15.0-EAP01 I had a few integration tests failing.
The tests are failing when performing a JQL search, it returns 0 values when expecting a specific issue to be returned.
By manually reproducing the use case, the results is correct.
By adding line of code bellow in the integration tests before executing the JQL the Tests will pass.
ThreadLocalSearcherCache.internalCloseSearchers()
Anyone knows if there was any change regarding caches or indexes in the latest 8.15.0-EAP01 that developers should be aware of?
Thank you.
Hi,
I am not aware of any changes realted to indexing between 8.14 and 8.15. There were quite a few changes related to indexing in 8.12 but imho nothing related to the prolem you are seeing.
Index searchers are cached per thread (usullaly request thread). Once a fresh index searcher is created for a request it will not see changes from concurrent threads. The changes will be visible only:
- on the next request when a new index searcher is created
- if the current thread is doing any writes to the index (this clears the cached index searcher automatically so the next search in this thread can see the changes done earlier in this thread).
Note that when you are running calls to Jira API (index search, index update) in your own thread the boudaries (which are autmatically done for reuqest threads) should be managed via:
com.atlassian.jira.util.thread.JiraThreadLocalUtil
Could you provide the code of the test wich started failing in 8.15?
Thx
mac
1 Like