-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
objstore: Added WithExpectedErrs which allows to control instrumentation (e.g not increment failures for expected not found). #2370
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ func (conf *Config) validate() error { | |
return nil | ||
} | ||
|
||
// NewBucket returns a new Bucket using the provided Azure config. | ||
// NewInMemBucket returns a new Bucket using the provided Azure config. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like an unrelated change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦♂️ |
||
func NewBucket(logger log.Logger, azureConfig []byte, component string) (*Bucket, error) { | ||
level.Debug(logger).Log("msg", "creating new Azure bucket connection", "component", component) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,9 +40,9 @@ type BucketConfig struct { | |
Config interface{} `yaml:"config"` | ||
} | ||
|
||
// NewBucket initializes and returns new object storage clients. | ||
// NewInMemBucket initializes and returns new object storage clients. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like an unrelated change? |
||
// NOTE: confContentYaml can contain secrets. | ||
func NewBucket(logger log.Logger, confContentYaml []byte, reg prometheus.Registerer, component string) (objstore.Bucket, error) { | ||
func NewBucket(logger log.Logger, confContentYaml []byte, reg prometheus.Registerer, component string) (objstore.InstrumentedBucket, error) { | ||
level.Info(logger).Log("msg", "loading bucket configuration") | ||
bucketConf := &BucketConfig{} | ||
if err := yaml.UnmarshalStrict(confContentYaml, bucketConf); err != nil { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ func NewBucketFromConfig(conf []byte) (*Bucket, error) { | |
return NewBucket(c.Directory) | ||
} | ||
|
||
// NewBucket returns a new filesystem.Bucket. | ||
// NewInMemBucket returns a new filesystem.Bucket. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. |
||
func NewBucket(rootDir string) (*Bucket, error) { | ||
absDir, err := filepath.Abs(rootDir) | ||
if err != nil { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ type Bucket struct { | |
closer io.Closer | ||
} | ||
|
||
// NewBucket returns a new Bucket against the given bucket handle. | ||
// NewInMemBucket returns a new Bucket against the given bucket handle. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. |
||
func NewBucket(ctx context.Context, logger log.Logger, conf []byte, component string) (*Bucket, error) { | ||
var gc Config | ||
if err := yaml.Unmarshal(conf, &gc); err != nil { | ||
|
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.
Is this expected to cover the case of a partially uploaded block (while still uploading)?
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