mridulm commented on code in PR #37648:
URL: https://github.com/apache/spark/pull/37648#discussion_r956351701


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java:
##########
@@ -125,18 +125,13 @@ public ShuffleIndexInformation load(String filePath) 
throws IOException {
       .weigher((Weigher<String, ShuffleIndexInformation>)
         (filePath, indexInfo) -> indexInfo.getRetainedMemorySize())
       .build(indexCacheLoader);
-    DBBackend dbBackend;
-    if (registeredExecutorFile != null) {
-      String dbBackendName =
-        conf.get(Constants.SHUFFLE_SERVICE_DB_BACKEND, 
DBBackend.LEVELDB.name());
-      dbBackend = DBBackend.byName(dbBackendName);
+    String dbBackendName =
+      conf.get(Constants.SHUFFLE_SERVICE_DB_BACKEND, DBBackend.LEVELDB.name());
+    DBBackend dbBackend = DBBackend.byName(dbBackendName);
+    db = DBProvider.initDB(dbBackend, this.registeredExecutorFile, 
CURRENT_VERSION, mapper);

Review Comment:
   Review note: Recovery need not be enabled for node managers - in which case 
`registeredExecutorFile` will be `null` (in addition to tests).
   
   `DBProvider.initDB` does handle null input though.
   
   So the main change in this file is moving the log message to `if (db != 
null)`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to