nickva commented on a change in pull request #2666: [WIP] soft-deletion for 
database
URL: https://github.com/apache/couchdb/pull/2666#discussion_r395117557
 
 

 ##########
 File path: src/fabric/src/fabric2_fdb.erl
 ##########
 @@ -314,12 +317,65 @@ delete(#{} = Db) ->
     } = ensure_current(Db),
 
     DbKey = erlfdb_tuple:pack({?ALL_DBS, DbName}, LayerPrefix),
-    erlfdb:clear(Tx, DbKey),
-    erlfdb:clear_range_startswith(Tx, DbPrefix),
+    DoRecovery = fabric_util:do_recovery(),
+    case DoRecovery of
+        true ->
+            {Mega, Secs, _} = os:timestamp(),
+            NowSecs = Mega * 1000000 + Secs,
 
 Review comment:
   Makes sense. There is a balance here between using a non-standard format for 
time and the timestamp being an identifier of an db instance we want to 
restore. That is on one hand it might be nice to use 
https://en.wikipedia.org/wiki/ISO_8601 format (`2007-03-01T13:00:00Z` for ex.), 
however since we'd be passing that in the URL path we'd have to deal with `:` 
being a reserved character and encode it and all that.

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