[
https://issues.apache.org/jira/browse/GOBBLIN-1564?focusedWorklogId=678878&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-678878
]
ASF GitHub Bot logged work on GOBBLIN-1564:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 09/Nov/21 02:48
Start Date: 09/Nov/21 02:48
Worklog Time Spent: 10m
Work Description: phet commented on a change in pull request #3415:
URL: https://github.com/apache/gobblin/pull/3415#discussion_r745247922
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -984,15 +985,16 @@ private void checkQuota(DagNode<JobExecutionPlan>
dagNode) throws IOException {
}
if (!requesterCheck) {
- throw new IOException(requesterMessage);
+ throw new IOException(requesterMessage.toString());
}
}
/**
* Increment quota by one for the given map and key.
+ * We need synchronization on this method because quotaMap is shared among
all the {@link DagManagerThread}s.
* @return true if quota is not reached for this user or user is
whitelisted, false otherwise.
*/
- private boolean incrementMapAndCheckQuota(Map<String, Integer> quotaMap,
String user, DagNode<JobExecutionPlan> dagNode) {
+ synchronized private boolean incrementMapAndCheckQuota(Map<String,
Integer> quotaMap, String user, DagNode<JobExecutionPlan> dagNode) {
String key = DagManagerUtils.getUserQuotaKey(user, dagNode);
Review comment:
do you think a comment would help... or not necessary?
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 678878)
Time Spent: 4h 50m (was: 4h 40m)
> fix synchronization issue while using users job quota in DagManager in
> gobblin service
> --------------------------------------------------------------------------------------
>
> Key: GOBBLIN-1564
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1564
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)