-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
status: optimize GRPCStatus() calls #6539
Conversation
Hi @ash2k, seems like the |
Hi. It's a getter on gRPC's implementations, but it might be doing something in other implementations. It shouldn't have any side effects, but it may be allocating extra memory (e.g. to construct the object its returning), which is not required to do twice. It didn't cause any problems, I was just looking at the gRPC code while working on my project and spotted this. |
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.
diff lgtm.
I'm less concerned about the double calls since gs.GRPCStatus()
is only a getter and does not have other side-effects (for eg, incrementing a counter).
cc: @easwars for another look
closing and opening to re-run new tests |
I don't know why the vet-proto job is failing. I've just rebased the branch but it didn't help. |
vet-proto does not block merge. I've sent #6551 to fix the failure in the meantime. |
RELEASE NOTES: none