Hi there,
I have calculated custom fields in which I perform JQL search using SearchProvider
.
During JIRA reindexing this service is unavailable and gets SearchUnailableExceptio
after 30 seconds.
Here is the cause of the exception
com.atlassian.jira.issue.index.IndexException: Wait attempt timed out - waited 30000 milliseconds.
I think this behaviour is caused by after JIRA 6.3.x enhancements.
What I wonder is, is this by design or just a bug? What should I do?
I can implement EventListener
in which I can listen ReindexCompletedEvent
and trigger reindex for those issues. But I am not sure that this is the right thing to do. it might have bad effect on performance.
Any suggestion or guide will be much appreciated.
Tuncay
Community moderators have prevented the ability to post new answers.
Tuncay, this has come up before. You're right that it's a change in 6.3. At some point I will add some defensive code for this, along the lines of what you are suggesting. I suspect there is an existing issue.
I don't think it will have an effect on performance... all that will happen is that just the script fields that use a jql search on just the issues in its context, will have that value reindexed.
Thanks for reply Jamie, I almost finished implementation, but in my case I tried to reindex issues, not contexts. So the issues which have custom field that has JQL search will be reindexed again. This is the performance issue. However I did not know reindexing context. Thanks for the light. I need to research on reindexing context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But the point is, if this is a bug than our effort on fixing the problem is really annoying. But if it is by design, then how are we supposed to know it before customers raise issues? It is annoying as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, As I mentioned, I succeeded re-reindexing those issues without getting SearchUnavailableException. This has two downsides : 1. From the console logs and within the UI it shows as 99% issues reindexed, however the process may continue in a time slot may be much more than 1%, depending on the count of issues that have custom field using JQL search. 2. I am selecting to re-reindex those issues that have custom fields ( fields with using JQL search). But I could not find any API to reindex issue for just the value of the custom field. So, when reindexing issue, it reindexes all fields/custom fields. For instance if 10 custom fields defined, and only one field is using JQL, in the process of re-reindexing other nine custom fields will be reindexing again, which will affect on performance. Is there any way to just index a custom field value like in the {{CustomFieldIndexer}}? I know you can write your own indexer, and I have a couple of them but Lucene {{Document}} is passed to this method, but in this case I have no {{Document}} and I am really stuck at this point. I hope I am clear Tuncay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.