-
Notifications
You must be signed in to change notification settings - Fork 672
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
[QOS] Skip showing unnecessary warning message #3708
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Vivek Reddy <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
config/main.py
Outdated
@@ -793,7 +793,7 @@ def _wait_until_clear(tables, interval=0.5, timeout=30, verbose=False): | |||
click.echo("Some entries matching {} still exist: {}".format(table, keys[0])) | |||
time.sleep(interval) | |||
empty = (non_empty_table_count == 0) | |||
if not empty: | |||
if not empty and timeout: |
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.
Suggest checking timeout != 0
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.
I've slightly updated the logic to also return True in case timeout is 0.
This is to be compatible with the following PR: #3710
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@bingwang-ms @kperumalbfn |
config/main.py
Outdated
@@ -793,6 +793,8 @@ def _wait_until_clear(tables, interval=0.5, timeout=30, verbose=False): | |||
click.echo("Some entries matching {} still exist: {}".format(table, keys[0])) | |||
time.sleep(interval) | |||
empty = (non_empty_table_count == 0) | |||
if timeout == 0: | |||
empty = True |
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.
This code looks a little wired. How about checking the value of timeout
and return True
directly at the beginning of the function of _wait_until_clear
? Or just skip calling this function _wait_until_clear
when timeout == 0
?
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.
Updated, Please check
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
What I did
Don't show an unnecessary warning message (
Operation not completed successfully, please save and reload configuration.
) during config qos reloadTo repro:
How I did it
When in traditional buffer mode, qos reload will not wait for tables to be cleared, so it will set the timeout to 0 in the _wait_until_clear call. But today, this prints an error log and exits.
Thus fixed to not print the error log when the timeout is zero.
How to verify it
UT and manual testing
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)