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

How to impl scan in this db ? #55

Open
TheLudlows opened this issue Mar 27, 2024 · 1 comment
Open

How to impl scan in this db ? #55

TheLudlows opened this issue Mar 27, 2024 · 1 comment

Comments

@TheLudlows
Copy link

Scan will cross shards, on which thread should scan be executed, and how should iterators organize it

@TheLudlows TheLudlows changed the title [Question]how to impl scan in this db ? How to impl scan in this db ? Mar 29, 2024
@tontinton
Copy link
Owner

Scan needs to go to the threads that contain the keys you want to scan.

The iterator should live in the client, rust has an AsyncIter only in nightly, so I would probably implement a trait that has a next function that the user needs to call manually, like I did in iter_filter.

To make this performant you would probably need to implement a new response type that streams the results from the server, instead of closing after a single response.

Not a simple feature, but it basically comes down to this.

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

2 participants