[#185] Update SDK to support new tree/pool version
All checks were successful
/ Builds (push) Successful in 51s
/ Vulncheck (push) Successful in 45s
/ OCI image (push) Successful in 1m37s
/ Lint (push) Successful in 2m37s
/ Tests (push) Successful in 54s

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2024-12-20 09:45:42 +03:00 committed by Alexey Vanin
parent e1b670a727
commit 1db62f9d95
15 changed files with 299 additions and 38 deletions

View file

@ -65,6 +65,7 @@ type (
services []*metrics.Service
settings *appSettings
loggerSettings *loggerSettings
bucketCache *cache.BucketCache
servers []Server
unbindServers []ServerInfo
@ -134,6 +135,7 @@ func newApp(ctx context.Context, v *viper.Viper) App {
loggerSettings: logSettings,
webServer: new(fasthttp.Server),
webDone: make(chan struct{}),
bucketCache: cache.NewBucketCache(getBucketCacheOptions(v, log.logger), v.GetBool(cfgFeaturesTreePoolNetmapSupport)),
}
a.initAppSettings()
@ -151,7 +153,7 @@ func newApp(ctx context.Context, v *viper.Viper) App {
a.webServer.DisablePreParseMultipartForm = true
a.webServer.StreamRequestBody = a.cfg.GetBool(cfgWebStreamRequestBody)
// -- -- -- -- -- -- -- -- -- -- -- -- -- --
a.pool, a.treePool, a.key = getPools(ctx, a.log, a.cfg, a.settings.dialerSource)
a.initPools(ctx)
var owner user.ID
user.IDFromKey(&owner, a.key.PrivateKey.PublicKey)
@ -839,7 +841,7 @@ func (a *app) AppParams() *handler.AppParams {
FrostFS: frostfs.NewFrostFS(a.pool),
Owner: a.owner,
Resolver: a.resolver,
Cache: cache.NewBucketCache(getCacheOptions(a.cfg, a.log)),
Cache: a.bucketCache,
}
}