-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Removing hard coded value of max concurrent shard requests #3364
Conversation
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
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.
Thanks @jainankitk should we also add a test to ensure that we catch it if it accidentally gets reset to 1
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.
Thanks for doing this. It puts the action in sync w/ AbstractSearchAsyncActionTests#createAction
. It's up to you if you want to add a test to make sure the maxConcurrentRequestsPerNode
member variable keeps the value. I don't think it's necessary and will likely require you to add a getter method just for the test.
@nknize @Bukhtawar - Yeah, I could not think of good way to add test. Maybe we can merge the PR, to fix the regression asap and I will keep the issue open to add test whenever I have time? |
+1 So we don't miss (and in case another contributor wants to pick it up) go ahead and open an issue and throw a TODO in the code w/ a link to the issue. |
@nknize backport to 2.0, wdyt? |
yes |
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com> (cherry picked from commit f8b102c)
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com> (cherry picked from commit f8b102c)
don't worry about the TODO in the code (they're often overlooked and rarely taken out).. let's just open a low hanging fruit issue to track the test. |
FWIW, I don't agree, it's a bug, the value here isn't propagating properly in some scenario, so we should have a test. Otherwise I'll accidentally change it back to 1 and nothing will break. |
I agree with @dblock that we must have test (not optional) for preventing this regression from happening again. Though, I agree with @nknize to not hold the check-in back for test if it takes few days to get the tests in. This code is not new, but rather artifact of regression due to other commit. |
Nothing should break.
The value was straight hard coded to While the test should be as simple as ensuring the value matches the input, we need to avoid relaxing modifiers just for tests. So that needs a little more thought. It can wait to not hold up the fix and addressed in a follow up. |
@nknize Totally agree. Sure 1 is a valid value however we cannot allow the change to be reverted by a future commit for the same reason that it was tagged as a BUG. |
That's a fair concern. Label as a good first issue and high severity and it shouldn't linger. @jainankitk do you also want to assign it to yourself to prioritize it now that the fix is merged? |
@nknize @Bukhtawar I took first stab at it and after spending some time came up with below assertion. I liked this approach as we are not adding relaxing modifiers just for testing. Unfortunately, none of our tests trigger this code path at all! :( So, I guess this is going to take more time than expected. Open to any suggestions for expediting this.
|
Signed-off-by: Ankit Jain jain.ankitk@gmail.com
Description
Removes the hard coding for max concurrent shard requests
Issues Resolved
#3363
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.