tvalentyn commented on code in PR #31013:
URL: https://github.com/apache/beam/pull/31013#discussion_r1569812583
##########
sdks/python/apache_beam/runners/common.py:
##########
@@ -761,6 +761,17 @@ def __init__(self,
self.current_window_index = None
self.stop_window_index = None
+ # TODO(https://github.com/apache/beam/issues/28776): Remove caching after
+ # fully rolling out.
+ # If true, always recalculate window args. If false, has_cached_window_args
+ # and has_cached_window_batch_args will be set to true if the corresponding
+ # self.args_for_process,have been updated and should be reused directly.
+ self.recalculate_window_args = (
+ self.has_windowed_inputs or 'disable_global_windowed_args_caching' in
+ RuntimeValueProvider.experiments)
Review Comment:
I haven't tried this method of fetching experiments; I recommend you try to
test that it works on Dataflow. For example, you could throw a runtime error
for testing purposes.
##########
sdks/python/apache_beam/runners/common.py:
##########
@@ -761,6 +761,17 @@ def __init__(self,
self.current_window_index = None
self.stop_window_index = None
+ # TODO(https://github.com/apache/beam/issues/28776): Remove caching after
+ # fully rolling out.
+ # If true, always recalculate window args. If false, has_cached_window_args
+ # and has_cached_window_batch_args will be set to true if the corresponding
+ # self.args_for_process,have been updated and should be reused directly.
+ self.recalculate_window_args = (
+ self.has_windowed_inputs or 'disable_global_windowed_args_caching' in
+ RuntimeValueProvider.experiments)
+ self.has_cached_window_args = False
Review Comment:
I think `has_cached_args` or `has_cached_windowed_args` might be a better
name .
--
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]