Skip to content
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

[syncd] Update log level for bulk api #1492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jianyuewu
Copy link

@jianyuewu jianyuewu commented Jan 3, 2025

Log level should be warning instead of error, because functionality is fine. Latter code will fall back to use single api instead of bulk api, when syncd support bulk but sai doesn't support it.

Background
When syncd added support for bulk APIs like bulk set, but sai didn't implement it, this error will be printed:
"processBulkOidSet: bulk set api is not implemented or not supported, object_type = SAI_OBJECT_TYPE_QUEUE", and it will fail the cases. Actually the print should be warning, as in current code, bulk set fall back to single set in latter code, so sai will still receive single set APIs, so functionality is actually OK.

What I did
Update log level from error to warning.

How to verify it
When bulk set api is added in syncd, but sai did not implement it, only warning logs will be printed, instead of error logs.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

kcudnik
kcudnik previously approved these changes Jan 4, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@keboliu keboliu requested a review from liat-grozovik January 20, 2025 02:44
@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

kcudnik
kcudnik previously approved these changes Feb 6, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik
Copy link
Collaborator

kcudnik commented Feb 7, 2025

Your tests are failing please fix

@jianyuewu
Copy link
Author

Your tests are failing please fix

Thanks for remind, I'll check it.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

I'll try in local firstly, seems some difference in local result.

@kcudnik
Copy link
Collaborator

kcudnik commented Feb 7, 2025

[ RUN      ] SyncdTest.processEventBulkOperations
TestSyncd.cpp:325: Failure
Actual function call count doesn't match EXPECT_CALL(consumer, empty())...
         Expected: to be called twice
           Actual: never called - unsatisfied and active
unknown file: Failure
C++ exception with description ":- sai_deserialize_object_id: invalid oid 0" thrown in the test body.
[  FAILED  ] SyncdTest.processEventBulkOperations (1003 ms)
[ RUN      ] SyncdTest.processEventBulkOperationsSuccess
TestSyncd.cpp:396: Failure
Actual function call count doesn't match EXPECT_CALL(consumer, empty())...
         Expected: to be called twice
           Actual: never called - unsatisfied and active
unknown file: Failure
C++ exception with description ":- sai_deserialize_object_id: invalid oid 0" thrown in the test body.
[  FAILED  ] SyncdTest.processEventBulkOperationsSuccess (1003 ms)

@jianyuewu
Copy link
Author

[ RUN      ] SyncdTest.processEventBulkOperations
TestSyncd.cpp:325: Failure
Actual function call count doesn't match EXPECT_CALL(consumer, empty())...
         Expected: to be called twice
           Actual: never called - unsatisfied and active
unknown file: Failure
C++ exception with description ":- sai_deserialize_object_id: invalid oid 0" thrown in the test body.
[  FAILED  ] SyncdTest.processEventBulkOperations (1003 ms)
[ RUN      ] SyncdTest.processEventBulkOperationsSuccess
TestSyncd.cpp:396: Failure
Actual function call count doesn't match EXPECT_CALL(consumer, empty())...
         Expected: to be called twice
           Actual: never called - unsatisfied and active
unknown file: Failure
C++ exception with description ":- sai_deserialize_object_id: invalid oid 0" thrown in the test body.
[  FAILED  ] SyncdTest.processEventBulkOperationsSuccess (1003 ms)

Thank you, Kamil, I'll check the errors.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu
Copy link
Author

UT updated and code rebased to latest commit.

@jianyuewu
Copy link
Author

Now all tests passed.

Log level should be warning instead of error, because functionality is
fine. Latter code will fall back to use single api instead of bulk api,
when syncd support bulk but sai doesn't support it.

Signed-off-by: Jianyue Wu <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants