fix: observe legacy failures in shadow worker
This commit is contained in:
@@ -156,6 +156,7 @@ public class ShadowObservationGateway {
|
||||
stage = ShadowFailureStage.LEGACY_WAIT;
|
||||
InboundShadowCompletion.LegacyResult legacy = completion.awaitLegacyResult();
|
||||
if (legacy.failure() != null) {
|
||||
recordWorkerFailure(taskNo, admission, stage, legacy.failure(), startedNanos);
|
||||
return;
|
||||
}
|
||||
if (!coordinator.isComparable(admission)) {
|
||||
@@ -185,6 +186,7 @@ public class ShadowObservationGateway {
|
||||
stage = ShadowFailureStage.LEGACY_WAIT;
|
||||
OutboundShadowCompletion.LegacyResult legacy = completion.awaitLegacyResult();
|
||||
if (legacy.failure() != null) {
|
||||
recordWorkerFailure(stockoutDetailId, admission, stage, legacy.failure(), startedNanos);
|
||||
return;
|
||||
}
|
||||
if (!coordinator.isComparable(admission)) {
|
||||
@@ -334,7 +336,7 @@ public class ShadowObservationGateway {
|
||||
|
||||
private void recordWorkerFailure(String requestId,
|
||||
ShadowSnapshotCoordinator.Admission admission, ShadowFailureStage stage,
|
||||
Exception failure, long startedNanos) {
|
||||
Throwable failure, long startedNanos) {
|
||||
metrics.recordError(stage);
|
||||
warnFailure(requestId, admission.snapshot().generation(), stage, failure, startedNanos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user