how to work about gerrit api changes

63 views
Skip to first unread message

陈翰林

unread,
Feb 22, 2022, 11:19:23 PM2/22/22
to Repo and Gerrit Discussion
when i have a request like : url/changes?q=is:open
how to get the datas for this requests about gerrit.
i delete a change from DATABASE table "CHANGES" and "CHANGES_MESSAGES" by change_id ,but the webUI still can show this change,
so how can i delete this change
thanks

luca.mi...@gmail.com

unread,
Feb 23, 2022, 2:49:02 AM2/23/22
to 陈翰林, Repo and Gerrit Discussion


Sent from my iPhone

On 23 Feb 2022, at 04:19, '陈翰林' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:

when i have a request like : url/changes?q=is:open
how to get the datas for this requests about gerrit.
i delete a change from DATABASE table "CHANGES" and "CHANGES_MESSAGES" by change_id ,but the webUI still can show this change,

Which Gerrit version are you running?

so how can i delete this change

Gerrit has a REST API for removing changes which would take care to remove the change and update indexes for it.

You should reply in APIs and not change the data directly.

To recover the situation you must shutdown Gerrit and reindex changes offline.

HTH

Luca

thanks

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/02ac48ab-23a8-451a-9326-8481cbe56713n%40googlegroups.com.

陈翰林

unread,
Feb 23, 2022, 2:56:05 AM2/23/22
to Repo and Gerrit Discussion
my version is 2.14.6, because i can't use api to delete it,it's 500 error for me,i had to delete it at server ,is any way?thanks

Luca Milanesio

unread,
Feb 23, 2022, 4:15:10 AM2/23/22
to Repo and Gerrit Discussion, Luca Milanesio, 陈翰林

On 23 Feb 2022, at 07:56, '陈翰林' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:

my version is 2.14.6, because i can't use api to delete it,it's 500 error for me,i had to delete it at server ,is any way?thanks

Why don’t you start investigating on why you get a 500?

Luca.

陈翰林

unread,
Feb 23, 2022, 8:30:37 PM2/23/22
to Repo and Gerrit Discussion
there are some old changes ,i  don't know why .
the gerrit server error log is 
"restapi.RestApiServlet:Error in GET /changes/335/revisions/..../commit?link"
"MissingObjectException:Missing unknow ...."
i don't know how to solve it
Reply all
Reply to author
Forward
0 new messages