[#576] Set SyncWrites for badger writecache by default
Some checks failed
Build / Build Components (1.19) (pull_request) Failing after 3s
Build / Build Components (1.20) (pull_request) Failing after 2s
Tests and linters / Tests (1.19) (pull_request) Failing after 3s
Tests and linters / Tests with -race (pull_request) Failing after 3s
Tests and linters / Lint (pull_request) Failing after 12s
Tests and linters / Staticcheck (pull_request) Failing after 3s
Vulncheck / Vulncheck (pull_request) Successful in 5m46s
Tests and linters / Tests (1.20) (pull_request) Successful in 11m37s
Some checks failed
Build / Build Components (1.19) (pull_request) Failing after 3s
Build / Build Components (1.20) (pull_request) Failing after 2s
Tests and linters / Tests (1.19) (pull_request) Failing after 3s
Tests and linters / Tests with -race (pull_request) Failing after 3s
Tests and linters / Lint (pull_request) Failing after 12s
Tests and linters / Staticcheck (pull_request) Failing after 3s
Vulncheck / Vulncheck (pull_request) Successful in 5m46s
Tests and linters / Tests (1.20) (pull_request) Successful in 11m37s
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
8d589314b5
commit
ae322e9f73
3 changed files with 1 additions and 13 deletions
|
@ -47,8 +47,6 @@ type options struct {
|
|||
maxCacheSize uint64
|
||||
// objCounters contains atomic counters for the number of objects stored in cache.
|
||||
objCounters counters
|
||||
// noSync is true iff FSTree allows unsynchronized writes.
|
||||
noSync bool
|
||||
// reportError is the function called when encountering disk errors in background workers.
|
||||
reportError func(string, error)
|
||||
// metrics is metrics implementation
|
||||
|
@ -109,16 +107,6 @@ func WithMaxCacheSize(sz uint64) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithNoSync sets an option to allow returning to caller on PUT before write is persisted.
|
||||
// Note, that we use this flag for FSTree only and DO NOT use it for a bolt DB because
|
||||
// we cannot yet properly handle the corrupted database during the startup. This SHOULD NOT
|
||||
// be relied upon and may be changed in future.
|
||||
func WithNoSync(noSync bool) Option {
|
||||
return func(o *options) {
|
||||
o.noSync = noSync
|
||||
}
|
||||
}
|
||||
|
||||
// WithReportErrorFunc sets error reporting function.
|
||||
func WithReportErrorFunc(f func(string, error)) Option {
|
||||
return func(o *options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue