-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 10.3.13, 11.3.7
-
Component/s: Webhooks
-
None
-
10.03
-
1
-
Severity 3 - Minor
Issue Summary
Asynchronous webhooks triggered by comment deletion were using Jira's request cache outside of the appropriate context. This caused the webhook executor to generate the JSON payload without access to some caches.
This problem was detailed in JRASERVER-78768 (issue events) and partially addressed in JRASERVER-79100 (worklog & issue link events), but the fix remains incomplete. As a result, even on Jira versions with those fixes, webhooks triggered by comment delete operations are still not using the cache correctly.
Steps to Reproduce
- Configure a webhook that include comment deletion events.
- Delete a comment on a Jira issue.
Expected Results
The error message is not observed in the log file.
Actual Results
The following error is logged once per webhook-dispatcher thread in atlassian-jira.log:
2026-06-29 01:03:17,555+0000 webhook-dispatcher:thread-2 ERROR [c.a.j.cache.request.RequestCacheRecorderImpl] Invalid use of RequestCache by thread: webhook-dispatcher:thread.Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details. This message will be logged once per thread. This ERROR should be fixed on the caller side (check the stack-trace or thread-name) as it is causing inconsistent data.
java.lang.Throwable
at com.atlassian.jira.cache.request.RequestCacheRecorderImpl.errorLogOOCThreadUsage(RequestCacheRecorderImpl.java:32)
at com.atlassian.jira.cache.request.RequestCacheRecorderImpl.recordRequestCacheOOCUsage(RequestCacheRecorderImpl.java:25)
at com.atlassian.jira.cache.request.RequestCacheImpl.get(RequestCacheImpl.java:46)
at com.atlassian.jira.config.feature.DefaultFeatureManager.isFlagEnabledByExternalActivator(DefaultFeatureManager.java:331)
at com.atlassian.jira.config.feature.DefaultFeatureManager.isEnabled(DefaultFeatureManager.java:116)
...
at com.atlassian.jira.plugins.webhooks.serializer.WebhookJsonEventFactory.lambda$build$19(WebhookJsonEventFactory.java:200)
at java.base/java.util.Optional.filter(Optional.java:218)
at com.atlassian.jira.plugins.webhooks.serializer.WebhookJsonEventFactory.build(WebhookJsonEventFactory.java:200)
at com.atlassian.jira.plugins.webhooks.serializer.WebhookJsonEventFactory.build(WebhookJsonEventFactory.java:140)
at com.atlassian.jira.plugins.webhooks.spi.JiraWebhookEventPublisher.lambda$onCommentDeletedEvent$8(JiraWebhookEventPublisher.java:204)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186)
at java.base/java.util.Optional.map(Optional.java:260)
at com.atlassian.webhooks.WebhookPublishRequest.getPayload(WebhookPublishRequest.java:154)
at com.atlassian.webhooks.internal.publish.DefaultWebhookInvocation.<init>(DefaultWebhookInvocation.java:67)
at com.atlassian.webhooks.internal.publish.DefaultWebhookInvocation.<init>(DefaultWebhookInvocation.java:44)
at com.atlassian.webhooks.internal.DefaultWebhookService.createSingleInvocationFor(DefaultWebhookService.java:447)
at com.atlassian.webhooks.internal.DefaultWebhookService.lambda$createInvocationsFor$15(DefaultWebhookService.java:440)
...
at com.atlassian.webhooks.internal.DefaultWebhookService.createInvocationsFor(DefaultWebhookService.java:441)
at com.atlassian.webhooks.internal.DefaultWebhookService.lambda$publish$10(DefaultWebhookService.java:271)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
...
In Jira 11.3.7, we see a different variant and not related to issue comment deletion:
Invalid use of RequestCache by thread/stack: webhook-dispatcher:thread-xxxxx
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available