My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 600: Change stuck in SUBMITTED state but actually merged
30 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Sep 2013


Sign in to add a comment
 
Reported by jkoles...@google.com, Jun 17, 2010
Affected Version:
2.1.2.4-43-g3c55dde

What steps will reproduce the problem?

I encountered this when I pushed a commit and a tag together:

$ git fetch && git checkout origin/master
$ vi CHANGELOG
$ git commit -a
$ git tag -s release-x
$ git push review:project HEAD:refs/for/master

What is the expected output? What do you see instead?

Change status should be consistent with the repository state. git fetch/ls-remote/etc all show the ref having been updated to point to the new commit, but the web UI shows the commit as being submitted, merge pending.


Jun 17, 2010
#1 sop@google.com
(No comment was entered for this change.)
Status: Accepted
Aug 20, 2010
#2 otan...@gmail.com
Same thing happened to me.
Sep 14, 2010
#3 prenau...@gmail.com
same here. What are we supposed to do with that commit?
Sep 14, 2010
#4 otan...@gmail.com
I have abandoned mine, just so it won't show on the open listing.
Sep 14, 2010
Project Member #5 lscar...@gmail.com
go to the database and to this:

reviewdb> update changes set open='N', status='M' where change_id=00000;

You don't need to abandon it. 
Anyway, even thought you did abandon it, you can do it and have your change in the correct status.

Luciano
Oct 25, 2010
#6 Jongwoo....@gmail.com
Same thing happens to me with 2.1.5.

gerrit status is "Submitted, Merge pending", but actually merged to git repository.
Oct 13, 2011
#7 sugnes...@gmail.com
Any solution for this Gerrit status "Submitted, Merge pending" ..


Nov 5, 2011
#8 Romy.Max...@gmail.com
This is pretty annoying, will this be fixed soon ?
Nov 14, 2011
#9 szmneo@gmail.com
I have solved my problem.
It means that there are something wrong in its Dependencies~ Check carefully
Apr 3, 2012
#10 ja...@abneptis.com
For others googling, you may also do well to check patch_set_approvals for 'change_open' entries that don't match the open status in changes.
Jun 14, 2012
#11 hoef...@gmail.com
This happens to me whenever I push tags on commits which are not yet merged.

To prevent this, only tag a commit *after* it was merged by Gerrit.

(If it already happened -- the fix from Comment #5 still works)
Jul 3, 2012
#12 ferri...@chromium.org
Worth noting, at least for 2.1.8.*, this results in is:open returning those changes stuck in the submitted/merge pending state...
Jan 4, 2013
#13 eihena...@googlemail.com
Hi all,

Had the same problem.

The fix is to reset the state of the change to review pending.  That is:

update changes set open='Y', status='n' where change_id=xxxxxxx;

This then makes the Submit Patch button re-appear.  Click on this to submit.
May 2, 2013
#14 blair@orcaware.com
In Gerrit 2.6 the SQL is slightly different to move the commit to a Merged state, the column name in the WHERE clause is different:

UPDATE changes SET open='N', status='M' WHERE change_key = 'I......';

May 3, 2013
Project Member #15 nas...@codeaurora.org
Doing that SQL update on just change_key is dangerous. change_key is not unique for each row. At the very least you need project= and branch= as well, but sticking with change_id is safest since that's guaranteed unique.
May 3, 2013
#16 blair@orcaware.com
Yes, good point, didn't think of that.

In the end, one would have to find the proper change_id using the change_key, project and branch name, in either one SQL SELECT and a follow up UPDATE or all together in one UPDATE.
Jun 4, 2013
#17 sop@google.com
https://gerrit-review.googlesource.com/46461
Status: ChangeUnderReview
Jul 14, 2013
#18 Chrisnor...@gmail.com
Hi,

I had this error occur in 2.7 rc1. Before finding this issue i tried to upgrade to rc2 (hoping it would magically go away). It didin't.

So i updated the SQL db by hand using the method mentioned above. I now get:
"500 Internal server error"

When trying to open some pages. Is there anyway i can fix this. Perhaps a super "clean/purge" function? If not any advice would be appreciated!

Chris
Jul 15, 2013
Project Member #19 ziv...@gmail.com
For the "500 internal server error" please provide the stack trace of the error from the logs/error_log
Sep 18, 2013
Project Member #20 edwin.ke...@gmail.com
https://gerrit-review.googlesource.com/49890
Status: Submitted
Labels: FixedIn-2.7
Sep 20, 2013
Project Member #21 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Released
Oct 22, 2013
#22 zu.bruce.china@gmail.com
after we upgraded to 2.6, issue  of "Change stuck in SUBMITTED state but actually merged" was reported now and then. not for the dependency pending , no conflict too, not for the cause of " a commit that has a tag". 

some of these cases is of the merged commit is submitted in to server side repository just DB record is left to update.  
others of the commit is not even be merged to server side repository.

it is annoyed and can't be retriggered.
any hints?

May 26, 2014
Project Member #23 bassem.rabil
We reproduced the same issue with Gerrit 2.8. I think this behaviour is resulting from the fact that Gerrit is getting the status of the change from DB, and not from the git repository where the real status lies. In our case the DB was not updated for any reason, the change was merged but still the DB was not up-to-date showing the status of the change still under review. Is there any progress on getting the status of the change from git repository from repository and not DB ?
May 27, 2014
#24 dborowitz@google.com
> I think this behaviour is resulting from the fact that Gerrit is getting the status
> of the change from DB, and not from the git repository where the real status lies.

I'm not sure what you mean by that; the status does not lie in the repo. You can check from the state of the destination branch whether the given change has been merged in, but you can't, for example, distinguish between NEW and DRAFT or NEW and SUBMITTED. That information lies only in the database (for now).

But we don't have transactions that cross repo and db, so sometimes these get out of sync.

For most cases where a change has actually been merged, clicking "submit" again will detect this and update the state in the database. For others, an admin can update the database manually, but we would probably like to know about it so we can make the first workaround work more reliably.
Sign in to add a comment

Powered by Google Project Hosting