dianfu commented on code in PR #27170:
URL: https://github.com/apache/flink/pull/27170#discussion_r2476243987
##########
flink-python/pyflink/fn_execution/datastream/process/async_function/queue.py:
##########
@@ -265,9 +275,10 @@ def put(self, windowed_value, timestamp, watermark,
record) -> ResultFuture[OUT]
return entry
def advance_watermark(self, watermark):
- with self._lock:
- if watermark > self._current_watermark:
- self._current_watermark = watermark
+ if watermark > self._current_watermark:
+ self._current_watermark = watermark
+
+ with self._lock:
Review Comment:
No. I have not encountered issues. I just noticed that we don't need to
acquire the lock each time `advance_watermark` is called when preparing this
PR. Since this change is very small and so I merged it into this PR.
--
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]