Skip to content
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

Better iteration #18

Open
mdorier opened this issue Nov 13, 2024 · 0 comments
Open

Better iteration #18

mdorier opened this issue Nov 13, 2024 · 0 comments

Comments

@mdorier
Copy link
Collaborator

mdorier commented Nov 13, 2024

Currently, iterating over a collection is done with the following backend function:

using DocIterCallback = std::function<Status(yk_id_t, const UserMem&)>;
virtual Status docIter(
    const char* collection,
    int32_t mode, uint64_t max, yk_id_t from_id,
    const std::shared_ptr<DocFilter>& filter,
    const DocIterCallback& func) const;

This should be changed so that the DocIterCallback can be called with an std::vector if the backend is able to provide all the UserMem in one batch (or in fewer batches). The filter function should also expose a shouldStop method so that one can specify UINT64_MAX as the max number of items, and the filter decides when to stop based on the key/doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant