-
Bug
-
Resolution: Fixed
-
High
-
5.0.1
-
None
-
None
-
Severity 3 - Minor
-
Summary
Merge-check hooks fail with database errors.
Steps to Reproduce
- N/A
Expected Results
The hook works as expected and no issues are logged.
Actual Results
The below exception is thrown in the atlassian-bitbucket.log file:
ERROR [threadpool:thread-4] <username> <sessionId> 127.0.0.1 "POST /rest/workzoneresource/latest/approvals/TPRJ/repo/1/sign HTTP/1.1" o.h.e.j.batch.internal.BatchingBatch HHH000315: Exception executing batch [org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1], SQL: update sta_pull_request set closed_timestamp=?, description=?, from_hash=?, locked_timestamp=?, rescoped_timestamp=?, pr_state=?, title=?, to_branch_name=?, to_hash=?, to_branch_fqn=?, updated_timestamp=?, entity_version=? where id=? and entity_version=? ... Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67) at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts(BatchingBatch.java:141) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:116) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:206) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:618) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50) at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1396) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1481) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1445) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1414) at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1457) at com.atlassian.stash.internal.pull.HibernatePullRequestDao.findByRepositoryScopedId(HibernatePullRequestDao.java:211) at com.atlassian.stash.internal.pull.DefaultPullRequestService.getPullRequestOrFail(DefaultPullRequestService.java:1357) at com.atlassian.stash.internal.pull.DefaultPullRequestService.getParticipants(DefaultPullRequestService.java:570)
Workaround
Not available
[BSERV-9782] Database error when running merge-check hooks
Workflow | Original: Stash Workflow - Restricted [ 2019998 ] | New: JAC Bug Workflow v3 [ 3137182 ] |
Symptom Severity | Original: Minor [ 14432 ] | New: Severity 3 - Minor [ 15832 ] |
Fix Version/s | New: 5.0.2 [ 72009 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: To be reviewed [ 10026 ] | New: Closed [ 6 ] |
Status | Original: In Progress [ 3 ] | New: To be reviewed [ 10026 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Assignee | New: Michael Heemskerk [ mheemskerk ] |
Priority | Original: Low [ 4 ] | New: High [ 2 ] |
Status | Original: Needs Triage [ 10030 ] | New: Open [ 1 ] |
Affects Version/s | New: 5.0.1 [ 71899 ] |
Description |
New:
h3. Summary
Merge-check hooks fail with database errors. h3. Steps to Reproduce # N/A h3. Expected Results The hook works as expected and no issues are logged. h3. Actual Results The below exception is thrown in the atlassian-bitbucket.log file: {noformat} ERROR [threadpool:thread-4] <username> <sessionId> 127.0.0.1 "POST /rest/workzoneresource/latest/approvals/TPRJ/repo/1/sign HTTP/1.1" o.h.e.j.batch.internal.BatchingBatch HHH000315: Exception executing batch [org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1], SQL: update sta_pull_request set closed_timestamp=?, description=?, from_hash=?, locked_timestamp=?, rescoped_timestamp=?, pr_state=?, title=?, to_branch_name=?, to_hash=?, to_branch_fqn=?, updated_timestamp=?, entity_version=? where id=? and entity_version=? ... Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67) at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts(BatchingBatch.java:141) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:116) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:206) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:618) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50) at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1396) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1481) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1445) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1414) at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1457) at com.atlassian.stash.internal.pull.HibernatePullRequestDao.findByRepositoryScopedId(HibernatePullRequestDao.java:211) at com.atlassian.stash.internal.pull.DefaultPullRequestService.getPullRequestOrFail(DefaultPullRequestService.java:1357) at com.atlassian.stash.internal.pull.DefaultPullRequestService.getParticipants(DefaultPullRequestService.java:570) {noformat} h3.Workaround Not available |