Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-10249] Populate state cache with initial values before appending #11997

Merged
merged 1 commit into from Jun 15, 2020

Conversation

mxm
Copy link
Contributor

@mxm mxm commented Jun 12, 2020

When new values are added to a bag state, the cache handler in the Python SDK
does not check whether the underlying state already has values present. Although
the append operation will be sent to the backend, the cache itself will be
corrupted because it returns only the newly appended values for get operations,
not the values present before the append operation.

This is a concern when restoring from a checkpoint but also when items are
evicted from the cache.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Samza Spark
Go Build Status --- --- Build Status --- Build Status
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status
XLang --- --- --- Build Status --- ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@mxm
Copy link
Contributor Author

mxm commented Jun 12, 2020

Run Python2_PVR_Flink PreCommit

@mxm
Copy link
Contributor Author

mxm commented Jun 12, 2020

Failures are unrelated to this change.

12:15:27     import rsa
12:15:27   File "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python2_PVR_Flink_Phrase/src/build/gradleenv/1866363813/local/lib/python2.7/site-packages/rsa/__init__.py", line 24, in <module>
12:15:27     from rsa.key import newkeys, PrivateKey, PublicKey
12:15:27   File "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python2_PVR_Flink_Phrase/src/build/gradleenv/1866363813/local/lib/python2.7/site-packages/rsa/key.py", line 1
12:15:27 SyntaxError: Non-ASCII character '\xc3' in file /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python2_PVR_Flink_Phrase/src/build/gradleenv/1866363813/local/lib/python2.7/site-packages/rsa/key.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

@mxm mxm requested review from robertwb and tweise June 12, 2020 10:31
@mxm
Copy link
Contributor Author

mxm commented Jun 12, 2020

Also Dataflow tests are failing (unrelated):

12:46:05 1: Task failed with an exception.
12:46:05 -----------
12:46:05 * Where:
12:46:05 Script '/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit/src/sdks/python/test-suites/dataflow/common.gradle' line: 77
12:46:05 
12:46:05 * What went wrong:
12:46:05 Execution failed for task ':sdks:python:test-suites:dataflow:py2:preCommitIT_batch'.
12:46:05 > Process 'command 'sh'' finished with non-zero exit value 1
12:46:05 
12:46:05 * Try:
12:46:05 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
12:46:05 ==============================================================================
12:46:05 
12:46:05 2: Task failed with an exception.
12:46:05 -----------
12:46:05 * Where:
12:46:05 Script '/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit/src/sdks/python/test-suites/dataflow/common.gradle' line: 77
12:46:05 
12:46:05 * What went wrong:
12:46:05 Execution failed for task ':sdks:python:test-suites:dataflow:py2:preCommitIT_streaming'.
12:46:05 > Process 'command 'sh'' finished with non-zero exit value 1
12:46:05 
12:46:05 * Try:
12:46:05 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
12:46:05 ==============================================================================
12:46:05 
12:46:05 3: Task failed with an exception.
12:46:05 -----------
12:46:05 * Where:
12:46:05 Script '/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit/src/sdks/python/test-suites/dataflow/common.gradle' line: 77
12:46:05 
12:46:05 * What went wrong:
12:46:05 Execution failed for task ':sdks:python:test-suites:dataflow:py2:preCommitIT_batch_V2'.
12:46:05 > Process 'command 'sh'' finished with non-zero exit value 1
12:46:05

@mxm
Copy link
Contributor Author

mxm commented Jun 15, 2020

Run Python2_PVR_Flink PreCommit

@mxm
Copy link
Contributor Author

mxm commented Jun 15, 2020

Run Portable_Python PreCommit

@mxm
Copy link
Contributor Author

mxm commented Jun 15, 2020

Run Python PreCommit

When new values are added to a bag state, the cache handler in the Python SDK
does not check whether the underlying state already has values present. Although
the append operation will be sent to the backend, the cache itself will be
corrupted because it returns only the newly appended values for get operations,
not the values present before the append operation.

This is a concern when restoring from a checkpoint but also when items are
evicted from the cache.
@mxm mxm merged commit c328d2a into apache:master Jun 15, 2020
mxm added a commit to lyft/beam that referenced this pull request Jun 15, 2020
mxm added a commit to lyft/beam that referenced this pull request Jul 8, 2020
…te cache with initial values before appending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants