-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve DB provider API #9400
Labels
Comments
Rjected
added a commit
that referenced
this issue
Jul 9, 2024
This allows for the use of ranges in `unwind_table_by_walker`, which is required for this method to be used in other methods which take a range as input. ref #9400
Rjected
added a commit
that referenced
this issue
Jul 9, 2024
This adds a remove method that can be used in places where we're not using the output of `get_or_take`, and just need to remove a range of entries from a table. ref #9400
Rjected
added a commit
that referenced
this issue
Jul 9, 2024
This separates functionality into individual `get` and `take` methods, which are used internally for the `get_or_take` method. ref #9400
Rjected
added a commit
that referenced
this issue
Jul 9, 2024
This separates functionality into individual `get` and `take` methods, which are used internally for the `get_or_take` method. ref #9400
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
Currently we have a lot of methods that use a
TAKE
const internally, and we use this method often for removing things from the database. However, we also need a method that actuallyremove
s the elements from the database, without allocating. We also do not need to use a const for this.Examples include:
get_or_take
get_or_take_block_and_execution_range
unwind_or_peek_state
Instead, we should have:
get
take
remove
get_block_and_execution_range
take_block_and_execution_range
remove_block_and_execution_range
unwind_state
(ortake_state
)get_state
remove_state
This would also allow us to remove
get_block_and_execution_range
from theBlockWriter
trait, if we wanted to have a more clearRead
/Write
distinction in our traits. This method is in theBlockWriter
trait likely because theget_or_take
method requiresTX: DbTxMut
. Ideally theget
methods don't need this boundAdditional context
No response
The text was updated successfully, but these errors were encountered: