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 On Thu, Jun 8, 2017 at 5:27 AM, Tomasz Zajączkowski < tozajaczkow...@gmail.com> wrote: > 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 (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 < >> revie...@googlegroups.com> wrote: >> >>> 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 a.id, a.status, a.public, a.changenum, a.repository_id, >>> b.totalCount AS no_of_duplicate >>> >>> from reviews_reviewrequest a >>> >>> inner join ( SELECT changenum, COUNT(*) totalCount FROM >>> reviews_reviewrequest GROUP BY changenum) b ON a.changenum = b.changenum >>> >>> WHERE b.totalCount >= 2 order by a.changenum desc” >>> >>> There will be items with exactly same ‘status’ and/or ‘public’ values, >>> there will be some dupes where those are different but in all cases >>> repository_id differs between the dupes on changenum column.. Are you able >>> to point us in right direction in order to identify the problematic dupes >>> (or other issue that might be causing the problem) ? >>> --- >>> >>> Thanks >>> Rob >>> >>> On Friday, 26 May 2017 09:24:00 UTC+1, Rob Backhurst wrote: >>>> >>>> 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. >>>> We get a "HTTP 500 INTERNAL SERVER ERROR" from the browser and the >>>> following error in the ReviewBoard logs: >>>> >>>> -------------------------------- >>>> >>>> None - admin - /api/review-requests/27393/ - Exception thrown for user >>>> admin at >>>> http://reviews/api/review-requests/27393/?api_format=json&force-text-type=html&include-text-types=raw >>>> >>>> (1062, "Duplicate entry '1701871-1' for key >>>> 'reviews_reviewrequest_b8c24015'") >>>> Traceback (most recent call last): >>>> File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", >>>> line 112, in get_response >>>> response = wrapped_callback(request, *callback_args, **callback_kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line >>>> 52, in _wrapped_view_func >>>> response = view_func(request, *args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/django/views/decorators/vary.py", >>>> line 19, in inner_func >>>> response = func(*args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/base.py", line >>>> 196, in __call__ >>>> request, method, view, api_format=api_format, *args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/mixins/api_tokens.py", >>>> line 65, in call_method_view >>>> return view(request, *args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/djblets/util/decorators.py", line >>>> 75, in _call >>>> f = augmented_func(*args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", >>>> line 122, in _call >>>> return view_func(*args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/reviewboard/webapi/decorators.py", line >>>> 36, in _check >>>> return view_func(*args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", >>>> line 122, in _call >>>> return view_func(*args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/reviewboard/webapi/decorators.py", line >>>> 139, in _check >>>> return view_func(*args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/djblets/util/decorators.py", line >>>> 75, in _call >>>> f = augmented_func(*args, **kwargs) >>>> File "/usr/lib/python2.7/site-packages/djblets/webapi/decorators.py", >>>> line 122, in _call >>>> return view_func(*args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/base.py", line >>>> 488, in get >>>> etag = self.get_etag(request, obj, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/base.py", line >>>> 1134, in get_etag >>>> encode_etag=False, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/base.py", line >>>> 1162, in generate_etag >>>> etag = repr(self.serialize_object(obj, request=request, **kwargs)) >>>> File "/usr/lib/python2.7/site-packages/reviewboard/webapi/mixins.py", >>>> line 60, in serialize_object >>>> obj, *args, **kwargs) >>>> File >>>> "/usr/lib/python2.7/site-packages/djblets/webapi/resources/base.py", line >>>> 774, in serialize_object >>>> value = serialize_func(obj, request=request) >>>> File >>>> "/usr/lib/python2.7/site-packages/reviewboard/webapi/resources/review_request.py", >>>> line 561, in serialize_commit_id_field >>>> return obj.commit >>>> File >>>> "/usr/lib/python2.7/site-packages/reviewboard/reviews/models/review_request.py", >>>> line 273, in get_commit >>>> commit_id=six.text_type(self.changenum)) >>>> File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line >>>> 493, in update >>>> rows = query.get_compiler(self.db).execute_sql(None) >>>> File >>>> "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line >>>> 980, in execute_sql >>>> cursor = super(SQLUpdateCompiler, self).execute_sql(result_type) >>>> File >>>> "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line >>>> 786, in execute_sql >>>> cursor.execute(sql, params) >>>> File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line >>>> 53, in execute >>>> return self.cursor.execute(sql, params) >>>> File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 99, in >>>> __exit__ >>>> six.reraise(dj_exc_type, dj_exc_value, traceback) >>>> File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line >>>> 53, in execute >>>> return self.cursor.execute(sql, params) >>>> File >>>> "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line >>>> 124, in execute >>>> return self.cursor.execute(query, args) >>>> File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, >>>> in execute >>>> self.errorhandler(self, exc, value) >>>> File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line >>>> 36, in defaulterrorhandler >>>> raise errorclass, errorvalue >>>> IntegrityError: (1062, "Duplicate entry '1701871-1' for key >>>> 'reviews_reviewrequest_b8c24015'") >>>> >>>> >>>> -------------------------------- >>>> >>>> >>>> I've seen another similar post on this forum but no resolution. >>>> (https://groups.google.com/forum/#!topic/reviewboard/7T9oAFHuLSU) >>>> >>>> Is there anything we can do here? >>>> >>>> >>>> Thanks >>>> >>>> Rob >>>> >>>> >>>> -- >>> Supercharge your Review Board with Power Pack: >>> https://www.reviewboard.org/powerpack/ >>> Want us to host Review Board for you? Check out RBCommons: >>> https://rbcommons.com/ >>> Happy user? Let us know! https://www.reviewboard.org/users/ >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "reviewboard" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to reviewboard...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> -- >> Christian Hammond >> President/CEO of Beanbag >> Makers of Review Board >> > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Christian Hammond President/CEO of Beanbag <https://www.beanbaginc.com/> Makers of Review Board <https://www.reviewboard.org/> -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.