Do not assume DB down if change to index not found
The Gerrit SSH command "index changes" may receive change numbers that cannot be found or refer to repositories that have problems. The assumption of "DB is down" when receiving an OrmException was wrong because the JGit errors were simply wrapped as OrmException and do not necessarily mean that you cannot continue to process the other ones in the list. Change-Id: I1098be16b682dce8d4e63120e7e50f937b19a7b8
This commit is contained in:
parent
27d3f29137
commit
9a52dd1dce
@ -43,10 +43,8 @@ final class IndexChangesCommand extends SshCommand {
|
|||||||
void addChange(String token) {
|
void addChange(String token) {
|
||||||
try {
|
try {
|
||||||
changeArgumentParser.addChange(token, changes, null, false);
|
changeArgumentParser.addChange(token, changes, null, false);
|
||||||
} catch (UnloggedFailure e) {
|
} catch (UnloggedFailure | OrmException e) {
|
||||||
writeError("warning", e.getMessage());
|
writeError("warning", e.getMessage());
|
||||||
} catch (OrmException e) {
|
|
||||||
throw new IllegalArgumentException("database is down", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user