Compare commits
2 commits
master
...
research_b
Author | SHA1 | Date | |
---|---|---|---|
ac829855cb | |||
b65370428f |
9 changed files with 14 additions and 46 deletions
|
@ -2,23 +2,6 @@ name: Tests and linters
|
|||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: true
|
||||
|
||||
- name: Install linters
|
||||
run: make lint-install
|
||||
|
||||
- name: Run linters
|
||||
run: make lint
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
|
|
|
@ -256,7 +256,7 @@ func (a *applicationConfiguration) setShardWriteCacheConfig(newConfig *shardCfg,
|
|||
wc.smallObjectSize = writeCacheCfg.SmallObjectSize()
|
||||
wc.flushWorkerCount = writeCacheCfg.WorkersNumber()
|
||||
wc.sizeLimit = writeCacheCfg.SizeLimit()
|
||||
wc.noSync = writeCacheCfg.NoSync()
|
||||
wc.noSync = true
|
||||
wc.gcInterval = writeCacheCfg.GCInterval()
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ func (a *applicationConfiguration) setShardPiloramaConfig(c *config.Config, newC
|
|||
pr.enabled = true
|
||||
pr.path = piloramaCfg.Path()
|
||||
pr.perm = piloramaCfg.Perm()
|
||||
pr.noSync = piloramaCfg.NoSync()
|
||||
pr.noSync = true
|
||||
pr.maxBatchSize = piloramaCfg.MaxBatchSize()
|
||||
pr.maxBatchDelay = piloramaCfg.MaxBatchDelay()
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ func (a *applicationConfiguration) setShardStorageConfig(newConfig *shardCfg, ol
|
|||
case fstree.Type:
|
||||
sub := fstreeconfig.From((*config.Config)(storagesCfg[i]))
|
||||
sCfg.depth = sub.Depth()
|
||||
sCfg.noSync = sub.NoSync()
|
||||
sCfg.noSync = true
|
||||
default:
|
||||
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.WithFlushWorkersCount(wcRead.flushWorkerCount),
|
||||
writecachebbolt.WithMaxCacheSize(wcRead.sizeLimit),
|
||||
writecachebbolt.WithNoSync(wcRead.noSync),
|
||||
writecachebbolt.WithNoSync(true),
|
||||
writecachebbolt.WithLogger(c.log),
|
||||
)
|
||||
case writecacheconfig.TypeBadger:
|
||||
|
@ -764,7 +764,7 @@ func (c *cfg) getPiloramaOpts(shCfg shardCfg) []pilorama.Option {
|
|||
piloramaOpts = append(piloramaOpts,
|
||||
pilorama.WithPath(prRead.path),
|
||||
pilorama.WithPerm(prRead.perm),
|
||||
pilorama.WithNoSync(prRead.noSync),
|
||||
pilorama.WithNoSync(true),
|
||||
pilorama.WithMaxBatchSize(prRead.maxBatchSize),
|
||||
pilorama.WithMaxBatchDelay(prRead.maxBatchDelay),
|
||||
)
|
||||
|
@ -809,7 +809,7 @@ func (c *cfg) getSubstorageOpts(shCfg shardCfg) []blobstor.SubStorage {
|
|||
fstree.WithPath(sRead.path),
|
||||
fstree.WithPerm(sRead.perm),
|
||||
fstree.WithDepth(sRead.depth),
|
||||
fstree.WithNoSync(sRead.noSync),
|
||||
fstree.WithNoSync(true),
|
||||
}
|
||||
if c.metricsCollector != nil {
|
||||
fstreeOpts = append(fstreeOpts,
|
||||
|
|
|
@ -1,22 +1,6 @@
|
|||
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) {
|
||||
t.Run("defaults", func(t *testing.T) {
|
||||
empty := configtest.EmptyConfig()
|
||||
|
@ -174,3 +158,4 @@ func TestEngineSection(t *testing.T) {
|
|||
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.
|
||||
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.
|
||||
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 {
|
||||
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.ReadOnly = readOnly
|
||||
opts.NoSync = t.noSync
|
||||
opts.NoSync = true
|
||||
opts.Timeout = 100 * time.Millisecond
|
||||
opts.OpenFile = t.openFile
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ func WithPerm(perm fs.FileMode) Option {
|
|||
|
||||
func WithNoSync(noSync bool) Option {
|
||||
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.
|
||||
func WithNoSync(noSync bool) Option {
|
||||
return func(o *options) {
|
||||
o.noSync = noSync
|
||||
o.noSync = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue