Skip to content

Add Select operation #128

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

Open
amorenoz opened this issue May 25, 2021 · 7 comments · May be fixed by #399
Open

Add Select operation #128

amorenoz opened this issue May 25, 2021 · 7 comments · May be fixed by #399
Labels
Milestone

Comments

@amorenoz
Copy link
Collaborator

Currently, we only support cache-based listing using client.List(). Filtering can be performed by using WhereCache(). However, this makes it mandatory for clients to use Monitor() so the client registers all the DB updates and populates the cache. This has a significant performance (both in terms of memory and cpu) and might not be desired by the user.

We should support RFC7047 Select operation to allow users to inspect the database without having an in-memory copy of it.

My proposal for the API is to leave List() and Get() for cache-based operations and add a new API method called Select that performs the homonym operation.

@amorenoz
Copy link
Collaborator Author

amorenoz commented May 25, 2021

With regards to the API, I'm tempted to hide the ovsdb.Operation, make the transaction and return a list of elements. @dave-tucker , do you think Select operations are likely to be batched into larger transactions?

@dave-tucker dave-tucker added this to the 0.5.0 milestone May 25, 2021
@dave-tucker
Copy link
Collaborator

@amorenoz hmmm. I don't think it's likely to be batched, but for to be consistent with other operations it would be better to have it return []ovsdb.Operation. That way the client has total control over how things are run.

@rutuja-clusters
Copy link

rutuja-clusters commented Aug 4, 2021

Just wanted to know, is there an estimate by when this feature may be added.

@dave-tucker @amorenoz It would help if you could let me know, is there a group where doubts are discussed? I tried to join the slack channel mentioned in the readme but it asks to contact the workspace administrator (if not from redhat/nvidia).
Thanks

@amorenoz
Copy link
Collaborator Author

amorenoz commented Apr 4, 2022

Hi @rutuja-clusters , sorry I have missed your comment. I don't understand why you are not being able to join the slack channel. It's part of the ovn-org.slack.com. I'll ask around to see who can help here.

As for the ETA for this, we haven't had much push on this feature because of the possibility of using WhereCache. I don't know what the plans are on this. Any idea @flavio-fernandes @jcaamano ?

@jcaamano
Copy link
Collaborator

jcaamano commented Apr 4, 2022

There are no plans that I am aware of about this topic.

It should be straight forward enough to have a Select operation. I guess we would need to add as well an additional utility method able to parse the models from the results?

Also the added support of conditional monitoring might alleviate some of the initial concerns @amorenoz had in the issue opener.

@yuyang0
Copy link

yuyang0 commented Dec 25, 2023

@jcaamano any updaes of this issue? Select operation is very useful in some sceneries.

@jcaamano
Copy link
Collaborator

jcaamano commented Jan 2, 2024

@yuyang0 no updates. Would you be willing to contribute a PR towards this? Otherwise it is just a matter of finding the time to do it.

This was referenced Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants