[ https://issues.apache.org/jira/browse/SPARK-40004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Muralidharan reassigned SPARK-40004: ------------------------------------------- Assignee: Yang Jie > 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 > > {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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org