jason810496 commented on code in PR #69080:
URL: https://github.com/apache/airflow/pull/69080#discussion_r3489020889
##########
java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/Comm.kt:
##########
@@ -109,19 +112,22 @@ class CoordinatorComm(
}
@Throws(ApiError::class)
- suspend fun communicateImpl(body: Any): Any {
- var frame: IncomingFrame? = null
+ suspend fun communicateImpl(body: Any): Any =
+ commMutex.withLock {
+ val requestId = nextId.fetchAndAdd(1)
Review Comment:
Yes, the nextID itself is concurrent-safe. IIRC we didn't use the "id" for
ordering, we only treat it as identifier so I think we can move outside of the
lock.
--
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]