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

 ##########
 File path: src/fabric/src/fabric2_fdb.erl
 ##########
 @@ -172,7 +174,8 @@ create(#{} = Db0, Options) ->
     % Eventually DbPrefix will be HCA allocated. For now
     % we're just using the DbName so that debugging is easier.
     DbKey = erlfdb_tuple:pack({?ALL_DBS, DbName}, LayerPrefix),
-    DbPrefix = erlfdb_tuple:pack({?DBS, DbName}, LayerPrefix),
+    #{db_prefix_allocator := DBPrefixAllocator} = erlfdb_directory:root(),
 
 Review comment:
   We should probably not mix CouchDB internals with the erlfdb library. At 
first glance I would expect us not to touch the erlfdb library with this work. 
`Db` in `erlfdb`-land is an FDB database but here we are dealing with CouchDb 
`Db` instances so it already gets confusing.
   
   Would this work `erlfdb_hca:create(erlfdb_tuple:pack({?HCA}, LayerPrefix))` 
to create an allocator instance for our layer prefix only. We are not going for 
full on FDB directories and nodes just need a short and unique prefix.

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