You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Paprika allows removal by prefix. It is done with scanning pages and asking each page to DeleteByPrefix. This should not happen a lot and is believed that it's ok to have it use full subtree traversal. One thing that is missing though is that it's possible that at a given level a prefix of NibblePath will be empty. This effectively means that both, this page and all its descendants should be reclaimed and batch.RegisterForFutureReuse. To make it work, it should be possible to return a kind of null-page, that can have its address retrieved with batch.GetAddress(page). This address should return DbAddress.Null to allow updating it just as a regular page. To make it work the following items should be tackled:
IBatchContext.NullPage property returning a Page that resides at 0 (this will be the first RootPage but it's ok, it will be used just for reference
introduce checks for prefix.IsEmpty in all the DeleteByPrefix where if a prefix is empty, the page is registered for the reuse and IBatchContext.NullPage is returned from the call
make the page that is no longer needed register itself in batch.RegisterForFutureReuse
propagate the call with emtpy to the children so that it has a nice recursive behavior.
The text was updated successfully, but these errors were encountered:
Currently, Paprika allows removal by prefix. It is done with scanning pages and asking each page to
DeleteByPrefix
. This should not happen a lot and is believed that it's ok to have it use full subtree traversal. One thing that is missing though is that it's possible that at a given level a prefix ofNibblePath
will be empty. This effectively means that both, this page and all its descendants should be reclaimed andbatch.RegisterForFutureReuse
. To make it work, it should be possible to return a kind of null-page, that can have its address retrieved withbatch.GetAddress(page)
. This address should returnDbAddress.Null
to allow updating it just as a regular page. To make it work the following items should be tackled:IBatchContext.NullPage
property returning aPage
that resides at0
(this will be the firstRootPage
but it's ok, it will be used just for referenceprefix.IsEmpty
in all theDeleteByPrefix
where if a prefix is empty, the page is registered for the reuse andIBatchContext.NullPage
is returned from the callbatch.RegisterForFutureReuse
The text was updated successfully, but these errors were encountered: