Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10260

Nested iterable in state cache exceeds Python recursion limit

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.23.0
    • sdk-py-harness
    • None

    Description

      With state caching enabled, the changes in BEAM-8298 lead to an unbounded nesting of state iterables when appending to a bag state, quickly resulting in an exception:

      events = list(event_bag.read())  
      File "/code/venvs/venv/lib/python3.6/site-packages/apache_beam/runners/worker/bundle_processor.py", line 488, in __iter__    for elem in self.first:  
      File "/code/venvs/venv/lib/python3.6/site-packages/apache_beam/runners/worker/statecache.py", line 186, in __iter__    for item in value:  
      File "/code/venvs/venv/lib/python3.6/site-packages/apache_beam/runners/worker/statecache.py", line 186, in __iter__    for item in value:  
      File "/code/venvs/venv/lib/python3.6/site-packages/apache_beam/runners/worker/statecache.py", line 186, in __iter__    for item in value:  [Previous line repeated 977 more times]
      RecursionError: maximum recursion depth exceeded while calling a Python object 
      

      Attachments

        Issue Links

          Activity

            People

              mxm Maximilian Michels
              mxm Maximilian Michels
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h