[SPARK-43056][SS] RocksDB state store commit should continue background work only if its paused#40696
Closed
anishshri-db wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-43056][SS] RocksDB state store commit should continue background work only if its paused#40696anishshri-db wants to merge 2 commits intoapache:masterfrom
anishshri-db wants to merge 2 commits intoapache:masterfrom
Conversation
…k only if its paused
Contributor
Author
|
@HeartSaVioR - PTAL. Thanks |
Contributor
|
CI fails with odd errors. |
Contributor
Author
Seems like a known issue someone already posted to dev channel - sbt/sbt#7202 |
Contributor
Author
|
@HeartSaVioR - all tests passed. Please merge when you get a chance. Thx |
Contributor
|
Missed the notification. Thanks! Merging to master. |
Kimahriman
pushed a commit
to Kimahriman/spark
that referenced
this pull request
Jun 20, 2023
…nd work only if its paused ### What changes were proposed in this pull request? RocksDB state store commit should continue background work in finally only if its paused ### Why are the changes needed? If an exception is thrown earlier in the commit sequence before background work is paused, we fail with an exception in the finally clause. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Ran unit tests ``` StateStoreIntegrationSuite [info] Run completed in 16 seconds, 131 milliseconds. [info] Total number of tests run: 5 [info] Suites: completed 1, aborted 0 [info] Tests: succeeded 5, failed 0, canceled 0, ignored 0, pending 0 [info] All tests passed. ``` ``` StateStoreSuite [info] Run completed in 1 minute, 18 seconds. [info] Total number of tests run: 73 [info] Suites: completed 1, aborted 0 [info] Tests: succeeded 73, failed 0, canceled 0, ignored 0, pending 0 [info] All tests passed. ``` With simulated exception and without the fix, the code crashes with stack trace below. With the fix, we don't see the issue in the finally block. ``` org.rocksdb.RocksDBException: InvalidArgument at org.rocksdb.RocksDB.continueBackgroundWork(Native Method) at org.rocksdb.RocksDB.continueBackgroundWork(RocksDB.java:3611) at org.apache.spark.sql.execution.streaming.state.RocksDB.commit(RocksDB.scala:421) ``` Closes apache#40696 from anishshri-db/task/SPARK-43056. Authored-by: Anish Shrigondekar <anish.shrigondekar@databricks.com> Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
RocksDB state store commit should continue background work in finally only if its paused
Why are the changes needed?
If an exception is thrown earlier in the commit sequence before background work is paused, we fail with an exception in the finally clause.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Ran unit tests
With simulated exception and without the fix, the code crashes with stack trace below. With the fix, we don't see the issue in the finally block.