nickva commented on a change in pull request #3779:
URL: https://github.com/apache/couchdb/pull/3779#discussion_r725682028



##########
File path: src/fabric/src/fabric.erl
##########
@@ -504,9 +504,13 @@ cleanup_index_files() ->
 %% @doc clean up index files for a specific db
 -spec cleanup_index_files(dbname()) -> ok.
 cleanup_index_files(DbName) ->
-    lists:foreach(fun(File) ->
-        file:delete(File)
-    end, inactive_index_files(DbName)).
+    try lists:foreach(
+        fun(File) ->
+            file:delete(File)
+        end, inactive_index_files(DbName))
+    catch
+        error:database_does_not_exist -> []

Review comment:
       It's a bit odd to return `[]` on `database_does_not_exit` but `ok` when 
it does. Is this tied to a peculiarity when calling this, something like we try 
again if result is not `ok`?
   




-- 
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]


Reply via email to