You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/07/14 23:29:06 UTC

[GitHub] [couchdb] nickva commented on a diff in pull request #4111: Fix not_found error smoosh

nickva commented on code in PR #4111:
URL: https://github.com/apache/couchdb/pull/4111#discussion_r921690688


##########
src/smoosh/src/smoosh_channel.erl:
##########
@@ -472,11 +472,19 @@ maybe_start_compaction(State) ->
 start_compact(State, DbName) when is_list(DbName) ->
     start_compact(State, ?l2b(DbName));
 start_compact(State, DbName) when is_binary(DbName) ->
-    {ok, Db} = couch_db:open_int(DbName, []),
-    try
-        start_compact(State, Db)
-    after
-        couch_db:close(Db)
+    case couch_db:open_int(DbName, []) of
+        {ok, Db} ->
+            try
+                start_compact(State, Db)
+            after
+                couch_db:close(Db)
+            end;
+        {not_found, no_db_file} ->

Review Comment:
   Minor nit: to avoid repeating the error below can do `Err = {not_found, no_db_file}  ->` then in the warning use `Err`
   
   



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org