You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/12/01 19:34:35 UTC

[GitHub] [yunikorn-core] craigcondit commented on a diff in pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased

craigcondit commented on code in PR #464:
URL: https://github.com/apache/yunikorn-core/pull/464#discussion_r1037492395


##########
pkg/scheduler/objects/application.go:
##########
@@ -1782,3 +1782,10 @@ func (sa *Application) SetTimedOutPlaceholder(taskGroupName string, timedOut int
 		sa.placeholderData[taskGroupName].TimedOut = timedOut
 	}
 }
+
+// test only
+func (sa *Application) addPlaceholderDataWithLocking(ask *AllocationAsk) {
+	sa.Lock()
+	defer sa.Unlock()
+	sa.addPlaceholderData(ask)
+}

Review Comment:
   Move this function into application_test.go since it is test-only. It's in the same package so will still compile.



-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org