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

 ##########
 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:
   hey @nickva, with the suggestion from @mikerhodes, the timestamp is 
specified in payload of POST instead of URL
   ```
     POST /{db}/_restore
   
     { "sourceTS": "<deletedTS>", "destination": "animaldb"}
   ```
   Thus, it is probably safe to use ISO_8601 format, like 
`2007-03-01T13:00:00Z` where `:` exists in payload.

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