-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix cleaning > 10000 channels #81
Conversation
Will do more testing next week to check this works as expected. |
5eaa8fb
to
1f73833
Compare
Elastic/ChannelFinder has a setting ES_QUERY_SIZE. So by default queries only return up to ES_QUERY_SIZE channels, which by default is 10000. When the clean runs it fetches using this api all channels where the pvStatus is Active. But if there are more than 10000 this won't work due to the ES_QUERY_SIZE. Solution here is to keep setting channels to Inactive and querying for more channels until there are no channels set to Active.
1f73833
to
52f0e6b
Compare
Quality Gate passedIssues Measures |
I ran into this issue and tried the PR. In most cases it seemed like 20K PVs got cleaned on shutdown out of 38K PVs. But this is using docker and docker-compose to run recceiver and that looks like the reason it doesn't fully work? Using the --timeout flag like Is there a reason to hard-code 10000 in the |
Quality Gate passedIssues Measures |
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.
LGTM! Added @shroffk as reviewer too
LGTM However, I think we should work on a better API for these kinds of operations |
Elastic/ChannelFinder has a setting ES_QUERY_SIZE. So by default queries only return up to ES_QUERY_SIZE channels, which by default is 10000.
When the clean runs it fetches using this api all channels where the pvStatus is Active. But if there are more than 10000 this won't work due to the ES_QUERY_SIZE.
Solution here is to keep setting channels to Inactive and querying for more channels until there are no channels set to Active.