jiangphcn commented on a change in pull request #2666: soft-deletion for 
database
URL: https://github.com/apache/couchdb/pull/2666#discussion_r400925228
 
 

 ##########
 File path: src/fabric/src/fabric2_fdb.erl
 ##########
 @@ -346,12 +351,97 @@ delete(#{} = Db) ->
     } = ensure_current(Db),
 
     DbKey = erlfdb_tuple:pack({?ALL_DBS, DbName}, LayerPrefix),
-    erlfdb:clear(Tx, DbKey),
-    erlfdb:clear_range_startswith(Tx, DbPrefix),
+    DoRecovery = fabric2_util:do_recovery(),
 
 Review comment:
   I split `delete` into `soft_delete_db/1` and `hard_delete_db/1`. For 
`remove_deleted_db`, it is a separate call from `fabric2_db:delete/2`.
   
   ```
   delete(#{} = Db) ->
       DoRecovery = fabric2_util:do_recovery(),
       case DoRecovery of
           true -> soft_delete_db(Db);
           false -> hard_delete_db(Db)
       end.
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to