Re: Integrity Error: 1062 Duplicate Entry

2017-06-08 Thread Christian Hammond
Hey Tomasz, Yep, that's it. It tries to migrate changenum to commit_id, and so you have one review request with the changenum being migrated, and another that already has that commit ID. You'll need to null out the field on one of those. If one is a discarded change, choose that one. Christian

Re: Integrity Error: 1062 Duplicate Entry

2017-06-08 Thread Tomasz Zajączkowski
I can see two rows one with changenum=1701871 and one for commit_id='1701871'. What I am looking for exactly? (apologies, 0 knowledge of this product/db here) On Wednesday, 7 June 2017 20:15:49 UTC+1, Christian Hammond wrote: > > Can you look for all review requests with changenum 1701871

Re: Integrity Error: 1062 Duplicate Entry

2017-06-07 Thread Christian Hammond
Can you look for all review requests with changenum 1701871 (possibly commit_id with that value --it's a string in this case), see what turns up? Christian On Wed, Jun 7, 2017 at 03:37 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: > Hi Christian, > > This is from our

Re: Integrity Error: 1062 Duplicate Entry

2017-06-07 Thread 'Rob Backhurst' via reviewboard
Hi Christian, This is from our DBA... ok, in that case we either have no problematic dupes or we are not sure how to find them. All dupes mentioned before have same changenum but different repository_id.. All items returned by executing below code have different repository_id: “select

Re: Integrity Error: 1062 Duplicate Entry

2017-06-07 Thread Christian Hammond
Hi Rob, Yeah, setting the field to null. There are unique indexes on (repository_id, commit_id) and (repository_id, changenum). It's fine for there to be multiple review requests with the same changenum or commit_id so long as they have different repository_ids. If there are duplicates, it'd be

Re: Integrity Error: 1062 Duplicate Entry

2017-05-26 Thread 'Rob Backhurst' via reviewboard
Hi Christian, Thanks for the quick response. I'm not particularly comfortable with SQL but i'll ask a colleague if he can help out - i'll let you know. Thanks Rob On Friday, 26 May 2017 09:24:00 UTC+1, Rob Backhurst wrote: > > Hi, > > We have recently upgraded our ReviewBoard from version

Re: Integrity Error: 1062 Duplicate Entry

2017-05-26 Thread Christian Hammond
Hi Rob, It looks like you have multiple review requests with the same commit ID/change number in the database. We have unique constraints that should prevent this, but the constraint may have been added after the review request was created. What you can do is unset the field (it's going to be

Integrity Error: 1062 Duplicate Entry

2017-05-26 Thread 'Rob Backhurst' via reviewboard
Hi, We have recently upgraded our ReviewBoard from version 1.7.22 to 2.5.10 - as well as also upgrading from RHEL 6.x to CentOS 7.3.1611. Since then we have a review that cannot be interacted with...can't post a new review or comment, adjust existing comments etc - or even delete the review.