You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/09/12 20:08:58 UTC

[couchdb] 15/28: Remove stub for swapping engines

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3287-pluggable-storage-engines
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit e0c2fc00c1f045832591deccffad8d17839fe58b
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue May 30 11:33:57 2017 -0500

    Remove stub for swapping engines
    
    This is vestigal code from an idea for swapping engines at compaction
    time. It was never fully implemented and got kicked out to a future v2
    of the API. For now I'll just remove the call out to an unimplemented
    function.
---
 src/couch/src/couch_db_updater.erl | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/couch/src/couch_db_updater.erl b/src/couch/src/couch_db_updater.erl
index d7a9af6..4a8158f 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -197,13 +197,8 @@ handle_cast(start_compact, Db) ->
             % compact currently running, this is a no-op
             {noreply, Db, idle_limit()}
     end;
-handle_cast({compact_done, CompactEngine, CompactInfo}, #db{} = OldDb) ->
-    {ok, NewDb} = case couch_db_engine:get_engine(OldDb) of
-        CompactEngine ->
-            couch_db_engine:finish_compaction(OldDb, CompactInfo);
-        _ ->
-            finish_engine_swap(OldDb, CompactEngine, CompactInfo)
-    end,
+handle_cast({compact_done, _Engine, CompactInfo}, #db{} = OldDb) ->
+    {ok, NewDb} = couch_db_engine:finish_compaction(OldDb, CompactInfo),
     {noreply, NewDb};
 
 handle_cast(wakeup, Db) ->
@@ -716,10 +711,6 @@ commit_data(Db, _) ->
     }.
 
 
-finish_engine_swap(_OldDb, _NewEngine, _CompactFilePath) ->
-    erlang:error(explode).
-
-
 pair_write_info(Old, New) ->
     lists:map(fun(FDI) ->
         case lists:keyfind(FDI#full_doc_info.id, #full_doc_info.id, Old) of

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.