-
Notifications
You must be signed in to change notification settings - Fork 430
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
adding gcs call log for storage layout api #2629
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2629 +/- ##
==========================================
- Coverage 77.63% 77.61% -0.02%
==========================================
Files 109 109
Lines 15540 15550 +10
==========================================
+ Hits 12064 12069 +5
- Misses 2964 2968 +4
- Partials 512 513 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5d840e9
to
48341f0
Compare
48341f0
to
3d2ab47
Compare
var err error | ||
|
||
// BucketType internally calls GetStorageLayout API from control client , hence | ||
// logging this as a GetStorageLayout call. |
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.
Will the call be logged even if GetStorageLayout GCS call has not happened ? BucketType() only calls the api once and uses the type throughout the lifecycle of mount
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.
Yes. Even when the actual network call has not happened, this is logged as a GCS call (time of request completion is considerably less).
Another scenario I am unsure about is when the first call comes in for a non hierarchical bucket with nil control client,
if bh.bucketType == gcs.Nil {
if bh.controlClient == nilControlClient {
bh.bucketType = gcs.NonHierarchical
return bh.bucketType
}
then GetStorageLayout api is not called, but this is also logged with minimal time taken for serving request.
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.
then the logging information is not correct, the log should only come when gcs call happens
Description
As part of HNS , storage layout API is called, logs for this does not come at TRACE severity unlike other GCS calls. Hence, added the logic for the same so that when log severity is set to TRACE, then storage layout api calls are also logged as gcs calls.
Any error faced during fetching the bucket type is already logged at error level, and will show up in the logs separately . However, as for the GCS call log, the storage layout api returns with status OK even when error is faced and logged immediately afterwards due to the nature of implementation.
For e.g:
Link to the issue in case of a bug fix.
NA
Testing details