It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Ошибки при изменении статуса PR + предлагаемый фикс Edited

не чистится таблица для dao


В логах ошибки вида (Bitbucket Server, DB: Postgres):

c.a.s.i.e.AsyncBatchingInvokersTransformer There was an exception thrown trying to dispatch event 'com.atlassian.bitbucket.event.pull.PullRequestDeclinedEvent[source=com.atlassian.stash.internal.pull.DefaultPullRequestService@3e316076]' for the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.stash.internal.notification.pullrequest.PullRequestNotificationProducer.onPullRequestClosed(com.atlassian.bitbucket.event.pull.PullRequestDeclinedEvent), listener=com.atlassian.stash.internal.notification.pullrequest.PullRequestNotificationProducer@10b5497c}'
java.lang.RuntimeException: An error occurred while executing an external process: ERROR: cannot execute DELETE in a read-only transaction. Listener: com.atlassian.stash.internal.notification.pullrequest.PullRequestNotificationProducer event: com.atlassian.bitbucket.event.pull.PullRequestDeclinedEvent

 Происходит это при отработке метода AoCodeCoverageDao.deleteCoverageForCommit. Вероятно, ошибка в реализации ActiveObjects.deleteWithSQL в случае использования Postgress

workaround: отказаться от использования метода ActiveObjects.deleteWithSQL, использовать вместо него delete, например (класс AoCodeCoverageDao):

public int deleteCoverageForCommit(String commitId) {
AoFileCoverage[] items = ao.find(AoFileCoverage.class,ID_QUERY,commitId);
ao.delete(items);"{} coverage entries were deleted for commit {}", items.length, commitId);
return items.length;

В таком варианте работает 



Log in or Sign up to comment
Community showcase
Published in Marketplace Apps & Integrations

Expose your beautifully crafted Dashboard through the Jira Service Desk Customer Portal

  A picture is worth a thousand words, especially when you're trying to find relationships and understand your data. Here, Dashboards play a vital role in gaining insights from a variety of dat...

273 views 5 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you