Will-Lo commented on code in PR #3520:
URL: https://github.com/apache/gobblin/pull/3520#discussion_r898445055
##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagManagerTest.java:
##########
@@ -990,10 +990,19 @@ public void testQuotasRetryFlow() throws
URISyntaxException, IOException {
// Dag1 is running
this._dagManagerThread.run();
+ SortedMap<String, Counter> allCounters =
metricContext.getParent().get().getCounters();
+ Assert.assertEquals(allCounters.get(MetricRegistry.name(
+ ServiceMetricNames.GOBBLIN_SERVICE_PREFIX,
+ ServiceMetricNames.SERVICE_USERS,
+ "user")).getCount(), 1);
// Dag1 fails and is orchestrated again
this._dagManagerThread.run();
// Dag1 is running again
this._dagManagerThread.run();
+ Assert.assertEquals(allCounters.get(MetricRegistry.name(
+ ServiceMetricNames.GOBBLIN_SERVICE_PREFIX,
+ ServiceMetricNames.SERVICE_USERS,
+ "user")).getCount(), 1);
Review Comment:
There was only 1 job, and it fails and is retried via the
GobblinTrackingEvents. Before this change it would be marked as 2 because the
FAILED event is never propagated to the DagManager, it would be marked as
PENDING_RETRY here and would attempt another increment, thus making the count
2. This is an overcount so the test was to guard against that.
The comment refers to the internal quota, once line 1007 is run then the
quota should reset to 0, and offerring another dag would not run into the
exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]