iilyak commented on a change in pull request #474: 3364 fix view compactor 
unknown info
URL: https://github.com/apache/couchdb/pull/474#discussion_r110982976
 
 

 ##########
 File path: src/couch_index/src/couch_index.erl
 ##########
 @@ -192,7 +192,17 @@ handle_call({compacted, NewIdxState}, _From, State) ->
             end;
         false ->
             {reply, ok, commit_compacted(NewIdxState, State)}
-    end.
+    end;
+handle_call({compaction_failed, Reason}, _From, State) ->
+    #st{
+        mod = Mod,
+        idx_state = OldIdxState,
+        waiters = Waiters
+    } = State,
+    send_all(Waiters, Reason),
+    {ok, NewIdxState} = Mod:remove_compacted(OldIdxState),
 
 Review comment:
   This is a braking change. It introduces a new API call which could be 
missing on custom index type. 
   If the Mod doesn't have remove_compacted function it would crash here.
   I think it is acceptable behavior though since it is currently failing 
anyway.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to