Inconsistencies after database crash

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

There are many inconsistencies in the database and some pull requests are missing. Users may not be able to create pull requests which will yield the following error:

2016-07-29 14:22:20,994 ERROR [threadpool:thread-1] rob @A027H2x862x18467x0 10.202.46.100 "POST /scm/jreg/jreg.git/git-receive-pack HTTP/1.1" c.a.s.i.hook.PushPostReceiveHook JREG/jreg[1]: A RepositoryPushActivity could not be created for the following ref changes
- refs/heads/feature/JRE-12411: 0275b552f5f5fa0734c7ea11e0b3123928708456 -> 59503827a770ed170a315c7563ed52888efd937f (UPDATE)
org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into sta_activity (created_timestamp, activity_type, user_id, id) values (?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch

Cause

The database was shut down or crashed while Bitbucket was still running.

Resolution

There have been many improvements in recent version of Bitbucket that handle this situation. All you have to do is restart Bitbucket and these inconsistencies will be resolved. 

Last modified on Jan 11, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.