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
sssctl: Management of indexes on cache DBs. #6368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the PR seems good but there are several things to improve.
By the way, due to recent changes in POPT library you may need to free sss_tool_popt_ex()->action_str
manually. Please check PR6350 for more information.
On top of that, I'd like to ask you, do I need to do anything special to test theses changes? I see you mention that the attribute needs to be indexed but I don't know if that's manually or automatically handled.
Nothing special to do. You just run the command and you can verify the @INDEXLIST entry to check the index was created. The reminder about creating the remote index is displayed because there is not much we can do here. This command affects only the local caches. Up to the user to create the indexes on the remote server. And it is for performance sake, not actually needed for the feature to work.
|
Your PR is not pulled yet and I cannot free I'm not sure how to proceed here. |
I missed I was requested to re-review your PR. I'll do it as soon as possible and when it is pulled, I'll be able to make those changes here. |
Perfect! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see once Iker's comments are resolved.
T.
While testing the changes I've found that sssctl crashes. @aplopez I've sent you an email with the steps to reproduce the error and some additional information. |
Geez. It was the Fixed now. |
Thanks! I've been able to test it and it seems good. I'm not giving my approval yet as the PR isn't in the final version, but so far so good. |
A new command was added to sssctl in order to manage indexes on the cache DBs. sssctl cache-index create -a attr [-d domain] sssctl cache-index delete -a attr [-d domain] sssctl cache-index list [-a attr] [-d domain] :feature: sssctl is now able to create, list and delete indexes on the local caches. Indexes are useful for the new D-Bus ListByAttr() function. :relnote: The new D-Bus function ListByAttr() allows the caller to look for users that have an attribute with a certain value. For performance reasons, it is recommended that the attribute is indexed both on the remote server and on the local cache. The sssctl tool now provides the cache-index command to help you manage indexes on the local cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine and I've tested the command without any problems so ack from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch, ACK
A new command was added to sssctl in order to manage indexes on the cache DBs.
sssctl is now able to create, list and delete indexes on the local caches. Indexes are useful for the new D-Bus ListByAttr() function.
sssctl cache-index create -a attr [-d domain]
sssctl cache-index delete -a attr [-d domain]
sssctl cache-index list [-a attr] [-d domain]
Task: https://issues.redhat.com/browse/SSSD-4981
:feature: sssctl is now able to create, list and delete indexes on the local caches. Indexes are useful for the new D-Bus ListByAttr() function.
:relnote: The new D-Bus function ListByAttr() allows the caller to look for users that have an attribute with a certain value. For performance reasons, it is recommended that the attribute is indexed both on the remote server and on the local cache. The sssctl tool now provides the cache-index command to help you manage indexes on the local cache.