You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
не чистится таблица для dao
AoFileCoverage
В логах ошибки вида (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);
log.info("{} coverage entries were deleted for commit {}", items.length, commitId);
return items.length;
}
В таком варианте работает