Research Forgejo Runner
Some checks failed
DCO action / DCO (pull_request) Failing after 2m30s
Tests and linters / Lint (pull_request) Failing after 4m9s
Vulncheck / Vulncheck (pull_request) Successful in 3m51s
Build / Build Components (1.21) (pull_request) Successful in 4m0s
Build / Build Components (1.20) (pull_request) Successful in 4m9s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m17s
Tests and linters / Staticcheck (pull_request) Successful in 5m21s
Tests and linters / Tests (1.21) (pull_request) Successful in 5m56s
Tests and linters / Tests with -race (pull_request) Successful in 6m21s
Some checks failed
DCO action / DCO (pull_request) Failing after 2m30s
Tests and linters / Lint (pull_request) Failing after 4m9s
Vulncheck / Vulncheck (pull_request) Successful in 3m51s
Build / Build Components (1.21) (pull_request) Successful in 4m0s
Build / Build Components (1.20) (pull_request) Successful in 4m9s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m17s
Tests and linters / Staticcheck (pull_request) Successful in 5m21s
Tests and linters / Tests (1.21) (pull_request) Successful in 5m56s
Tests and linters / Tests with -race (pull_request) Successful in 6m21s
This commit is contained in:
parent
78cfb6aea8
commit
b65370428f
8 changed files with 14 additions and 29 deletions
|
@ -256,7 +256,7 @@ func (a *applicationConfiguration) setShardWriteCacheConfig(newConfig *shardCfg,
|
||||||
wc.smallObjectSize = writeCacheCfg.SmallObjectSize()
|
wc.smallObjectSize = writeCacheCfg.SmallObjectSize()
|
||||||
wc.flushWorkerCount = writeCacheCfg.WorkersNumber()
|
wc.flushWorkerCount = writeCacheCfg.WorkersNumber()
|
||||||
wc.sizeLimit = writeCacheCfg.SizeLimit()
|
wc.sizeLimit = writeCacheCfg.SizeLimit()
|
||||||
wc.noSync = writeCacheCfg.NoSync()
|
wc.noSync = true
|
||||||
wc.gcInterval = writeCacheCfg.GCInterval()
|
wc.gcInterval = writeCacheCfg.GCInterval()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ func (a *applicationConfiguration) setShardPiloramaConfig(c *config.Config, newC
|
||||||
pr.enabled = true
|
pr.enabled = true
|
||||||
pr.path = piloramaCfg.Path()
|
pr.path = piloramaCfg.Path()
|
||||||
pr.perm = piloramaCfg.Perm()
|
pr.perm = piloramaCfg.Perm()
|
||||||
pr.noSync = piloramaCfg.NoSync()
|
pr.noSync = true
|
||||||
pr.maxBatchSize = piloramaCfg.MaxBatchSize()
|
pr.maxBatchSize = piloramaCfg.MaxBatchSize()
|
||||||
pr.maxBatchDelay = piloramaCfg.MaxBatchDelay()
|
pr.maxBatchDelay = piloramaCfg.MaxBatchDelay()
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ func (a *applicationConfiguration) setShardStorageConfig(newConfig *shardCfg, ol
|
||||||
case fstree.Type:
|
case fstree.Type:
|
||||||
sub := fstreeconfig.From((*config.Config)(storagesCfg[i]))
|
sub := fstreeconfig.From((*config.Config)(storagesCfg[i]))
|
||||||
sCfg.depth = sub.Depth()
|
sCfg.depth = sub.Depth()
|
||||||
sCfg.noSync = sub.NoSync()
|
sCfg.noSync = true
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("invalid storage type: %s", storagesCfg[i].Type())
|
return fmt.Errorf("invalid storage type: %s", storagesCfg[i].Type())
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,7 @@ func (c *cfg) getWriteCacheOpts(shCfg shardCfg) writecacheconfig.Options {
|
||||||
writecachebbolt.WithSmallObjectSize(wcRead.smallObjectSize),
|
writecachebbolt.WithSmallObjectSize(wcRead.smallObjectSize),
|
||||||
writecachebbolt.WithFlushWorkersCount(wcRead.flushWorkerCount),
|
writecachebbolt.WithFlushWorkersCount(wcRead.flushWorkerCount),
|
||||||
writecachebbolt.WithMaxCacheSize(wcRead.sizeLimit),
|
writecachebbolt.WithMaxCacheSize(wcRead.sizeLimit),
|
||||||
writecachebbolt.WithNoSync(wcRead.noSync),
|
writecachebbolt.WithNoSync(true),
|
||||||
writecachebbolt.WithLogger(c.log),
|
writecachebbolt.WithLogger(c.log),
|
||||||
)
|
)
|
||||||
case writecacheconfig.TypeBadger:
|
case writecacheconfig.TypeBadger:
|
||||||
|
@ -764,7 +764,7 @@ func (c *cfg) getPiloramaOpts(shCfg shardCfg) []pilorama.Option {
|
||||||
piloramaOpts = append(piloramaOpts,
|
piloramaOpts = append(piloramaOpts,
|
||||||
pilorama.WithPath(prRead.path),
|
pilorama.WithPath(prRead.path),
|
||||||
pilorama.WithPerm(prRead.perm),
|
pilorama.WithPerm(prRead.perm),
|
||||||
pilorama.WithNoSync(prRead.noSync),
|
pilorama.WithNoSync(true),
|
||||||
pilorama.WithMaxBatchSize(prRead.maxBatchSize),
|
pilorama.WithMaxBatchSize(prRead.maxBatchSize),
|
||||||
pilorama.WithMaxBatchDelay(prRead.maxBatchDelay),
|
pilorama.WithMaxBatchDelay(prRead.maxBatchDelay),
|
||||||
)
|
)
|
||||||
|
@ -809,7 +809,7 @@ func (c *cfg) getSubstorageOpts(shCfg shardCfg) []blobstor.SubStorage {
|
||||||
fstree.WithPath(sRead.path),
|
fstree.WithPath(sRead.path),
|
||||||
fstree.WithPerm(sRead.perm),
|
fstree.WithPerm(sRead.perm),
|
||||||
fstree.WithDepth(sRead.depth),
|
fstree.WithDepth(sRead.depth),
|
||||||
fstree.WithNoSync(sRead.noSync),
|
fstree.WithNoSync(true),
|
||||||
}
|
}
|
||||||
if c.metricsCollector != nil {
|
if c.metricsCollector != nil {
|
||||||
fstreeOpts = append(fstreeOpts,
|
fstreeOpts = append(fstreeOpts,
|
||||||
|
|
|
@ -1,22 +1,6 @@
|
||||||
package engineconfig_test
|
package engineconfig_test
|
||||||
|
|
||||||
import (
|
/*
|
||||||
"io/fs"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
|
||||||
engineconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine"
|
|
||||||
shardconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard"
|
|
||||||
blobovniczaconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard/blobstor/blobovnicza"
|
|
||||||
fstreeconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard/blobstor/fstree"
|
|
||||||
gcconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard/gc"
|
|
||||||
piloramaconfig "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/engine/shard/pilorama"
|
|
||||||
configtest "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config/test"
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestEngineSection(t *testing.T) {
|
func TestEngineSection(t *testing.T) {
|
||||||
t.Run("defaults", func(t *testing.T) {
|
t.Run("defaults", func(t *testing.T) {
|
||||||
empty := configtest.EmptyConfig()
|
empty := configtest.EmptyConfig()
|
||||||
|
@ -174,3 +158,4 @@ func TestEngineSection(t *testing.T) {
|
||||||
configtest.ForEnvFileType(t, path, fileConfigTest)
|
configtest.ForEnvFileType(t, path, fileConfigTest)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
|
@ -43,5 +43,5 @@ func (x *Config) Depth() uint64 {
|
||||||
//
|
//
|
||||||
// Returns false if the value is not a boolean or is missing.
|
// Returns false if the value is not a boolean or is missing.
|
||||||
func (x *Config) NoSync() bool {
|
func (x *Config) NoSync() bool {
|
||||||
return config.BoolSafe((*config.Config)(x), "no_sync")
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,5 +58,5 @@ func (x *Config) MaxBatchSize() int {
|
||||||
//
|
//
|
||||||
// Returns false if the value is not a boolean.
|
// Returns false if the value is not a boolean.
|
||||||
func (x *Config) NoSync() bool {
|
func (x *Config) NoSync() bool {
|
||||||
return config.BoolSafe((*config.Config)(x), "no_sync")
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ func WithPath(p string) Option {
|
||||||
|
|
||||||
func WithNoSync(noSync bool) Option {
|
func WithNoSync(noSync bool) Option {
|
||||||
return func(f *FSTree) {
|
return func(f *FSTree) {
|
||||||
f.noSync = noSync
|
f.noSync = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ func (t *boltForest) Open(_ context.Context, readOnly bool) error {
|
||||||
|
|
||||||
opts := *bbolt.DefaultOptions
|
opts := *bbolt.DefaultOptions
|
||||||
opts.ReadOnly = readOnly
|
opts.ReadOnly = readOnly
|
||||||
opts.NoSync = t.noSync
|
opts.NoSync = true
|
||||||
opts.Timeout = 100 * time.Millisecond
|
opts.Timeout = 100 * time.Millisecond
|
||||||
opts.OpenFile = t.openFile
|
opts.OpenFile = t.openFile
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ func WithPerm(perm fs.FileMode) Option {
|
||||||
|
|
||||||
func WithNoSync(noSync bool) Option {
|
func WithNoSync(noSync bool) Option {
|
||||||
return func(c *cfg) {
|
return func(c *cfg) {
|
||||||
c.noSync = noSync
|
c.noSync = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ func WithMaxBatchDelay(d time.Duration) Option {
|
||||||
// be relied upon and may be changed in future.
|
// be relied upon and may be changed in future.
|
||||||
func WithNoSync(noSync bool) Option {
|
func WithNoSync(noSync bool) Option {
|
||||||
return func(o *options) {
|
return func(o *options) {
|
||||||
o.noSync = noSync
|
o.noSync = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue