You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mridul Muralidharan (Jira)" <ji...@apache.org> on 2022/08/08 19:33:00 UTC
[jira] [Resolved] (SPARK-40004) Redundant `LevelDB.get` in `RemoteBlockPushResolver`
[ https://issues.apache.org/jira/browse/SPARK-40004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Muralidharan resolved SPARK-40004.
-----------------------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
Issue resolved by pull request 37435
[https://github.com/apache/spark/pull/37435]
> Redundant `LevelDB.get` in `RemoteBlockPushResolver`
> ----------------------------------------------------
>
> Key: SPARK-40004
> URL: https://issues.apache.org/jira/browse/SPARK-40004
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 3.4.0
> Reporter: Yang Jie
> Assignee: Yang Jie
> Priority: Minor
> Fix For: 3.4.0
>
>
> {code:java}
> void removeAppAttemptPathInfoFromDB(String appId, int attemptId) {
> AppAttemptId appAttemptId = new AppAttemptId(appId, attemptId);
> if (db != null) {
> try {
> byte[] key = getDbAppAttemptPathsKey(appAttemptId);
> if (db.get(key) != null) {
> db.delete(key);
> }
> } catch (Exception e) {
> logger.error("Failed to remove the application attempt {} local path in DB",
> appAttemptId, e);
> }
> }
> }
> {code}
> No need to check `db.get(key) != null` before delete. LevelDB will handle this scene.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org