Gerrit Change has Status:Submitted, Merge Pending, how to solve it?

前端 未结 7 1609
不知归路
不知归路 2020-12-17 10:12

The Gerrit system is only used by us several people. Once there is a Change A, and its status is: \"Submitted, Merge Pending\". The change list in the \"open\" web page. Als

7条回答
  •  盖世英雄少女心
    2020-12-17 10:43

    FYI. I had the same problem of "Submitted, Merge Pending" when user press submit twice on same page (she double clicked the submit button). It happened in Gerrit 2.11.

    Error in log looks like

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:     Duplicate entry '5173-2-1' for key 'PRIMARY'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    

    Before submitting there was only 1 commit (code changes). But after double pressing there are 2 commits. Second one is with new Commit Message and "Submitted, Merge Pending" status.

    When I removed all information about second commit:

    $ ssh -p 29418 admin@machine gerrit gsql
    gerrit> delete from `patch_set_approvals` where change_id=5173 and patch_set_id=2;
    gerrit> delete from `patch_set_ancestors` where change_id=5173 and patch_set_id=2;
    gerrit> delete from `patch_sets` where change_id=5173 and patch_set_id=2;
    

    it marked as integrated by user Gerrit Code Review .

提交回复
热议问题