You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2020/06/24 18:58:19 UTC

[beam] 01/01: Disable defensive_copy by default in InMemoryUnmergedState

This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch aaltay-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit b3500c7ce680bca472533b14b5da70af26184cb5
Author: Ahmet Altay <aa...@gmail.com>
AuthorDate: Wed Jun 24 11:57:55 2020 -0700

    Disable defensive_copy by default in InMemoryUnmergedState
---
 sdks/python/apache_beam/transforms/trigger.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/transforms/trigger.py b/sdks/python/apache_beam/transforms/trigger.py
index 23ca1e2..e517a39 100644
--- a/sdks/python/apache_beam/transforms/trigger.py
+++ b/sdks/python/apache_beam/transforms/trigger.py
@@ -1419,8 +1419,8 @@ class InMemoryUnmergedState(UnmergedState):
 
   Used for batch and testing.
   """
-  def __init__(self, defensive_copy=True):
-    # TODO(robertwb): Skip defensive_copy in production if it's too expensive.
+  def __init__(self, defensive_copy=False):
+    # TODO(robertwb): Clean defensive_copy. It is too expensive in production.
     self.timers = collections.defaultdict(dict)
     self.state = collections.defaultdict(lambda: collections.defaultdict(list))
     self.global_state = {}