Files
gerrit/java/com/google/gerrit/server
Patrick Hiesel 451cf002a9 Refactor AsyncReceiveCommits and ReceiveCommits
This commit refactors *ReceiveCommits. The main goal is
to move error handling and metric reporting to a central
place.

As in other parts of Gerrit, we use unchecked exceptions
for unrecoverable failures. They are handled in the
PreReceiveHook and translated into a message on the Git
wire.

We also make ReceiveCommits return a result instead of
accessing the result from a private member.

Having both unrecoverable exceptions as well as the result
of the operation - in case there were no exceptions -
handled in a single spot allows googlesource.com to report
more accurate metrics.

To have ReceiveCommits return a result, we have to use a
Callable. WorkQueue wasn't ready for that, so this commit
adds support for a Callable inside a ProjectRunnable.

WorkQueue seems like component with lots of thorny, multi-
threaded code that is rarely used. In the future, we might
want to get rid of it and just use standard thread pools.

Change-Id: I6a4b2731f8de77cc453b58f931a9ec7a3f5b6612
2020-04-17 09:47:32 +02:00
..
2020-02-22 20:14:51 -05:00
2020-04-01 14:35:09 +02:00
2020-04-10 11:27:05 +02:00
2020-04-10 10:53:20 +00:00
2020-03-09 14:02:54 +09:00
2020-04-01 14:35:09 +02:00
2020-04-01 14:35:09 +02:00
2020-01-28 14:49:07 +01:00