[
https://issues.apache.org/jira/browse/SPARK-59168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
XiDuo You resolved SPARK-59168.
-------------------------------
Fix Version/s: 4.4.0
Resolution: Fixed
Issue resolved by pull request 58466
[https://github.com/apache/spark/pull/58466]
> Avoid NoSuchElementException on missing keys in KVStore reads and writes
> ------------------------------------------------------------------------
>
> Key: SPARK-59168
> URL: https://issues.apache.org/jira/browse/SPARK-59168
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 5.0.0
> Reporter: XiDuo You
> Assignee: XiDuo You
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.4.0
>
>
> RocksDB.get and LevelDB.get throw NoSuchElementException for a missing key,
> and callers that treat a missing key as normal (getMetadata, the store
> constructor reading type aliases, and updateBatch probing for an existing
> entry) catch it. updateBatch does this probe on every write, and most writes
> during an event log rebuild are new entries, so each of those writes pays the
> cost of throwing and filling in an exception stack trace.
> Make get return null for a missing key and let the callers check for null
> directly. read keeps throwing NoSuchElementException to preserve the KVStore
> contract.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]