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

 ##########
 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:
   Maybe we'd want an allocator instance under the LayerPrefix and not use the 
main directory one just to keep things isolated. Without reading the hca code 
too closely, I assume that's where it would store its counters. Maybe something 
like `Allocator = erlfdb_hca:create(erlfdb_tuple:pack({?HCA}, LayerPrefix))`
   
   We should do a  quick benchmark at least to see if we see considerable 
contention when making lots of new databases in parallel. I suspect we won't 
but it's worth checking it out perhaps...

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