Skip to content

Try to make iterators 'static again #171

@marvin-j97

Description

@marvin-j97

Currently the iterators are lifetime-bound to the trees, because in the BlobTree, each Guard needs to get a Version reference (tree.current_version).

Can we clone the version handle so we own it and store it in the iterator return value, and (if needed, self cell could be used), give a reference of that to the Guards.

That would also avoid the Arc Clone for every KV we visited, instead it's just one clone once of the Version.

Because the iterator holds the Version, we cannot lose data while it is open.

This has the consequence of relaxing the iterator API of transactions in fjall as it was before 3.0.0, which is more ergonomic.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions