-
Notifications
You must be signed in to change notification settings - Fork 38
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
support reloading pool sizes with SIGHUP #3019
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3019 +/- ##
=======================================
Coverage 22.84% 22.85%
=======================================
Files 791 791
Lines 58684 58709 +25
=======================================
+ Hits 13409 13418 +9
- Misses 44377 44394 +17
+ Partials 898 897 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
552711d
to
32dce46
Compare
@@ -21,6 +21,9 @@ type WorkerPool interface { | |||
// functions have returned so synchronization must be achieved | |||
// via other means (e.g. sync.WaitGroup). | |||
Release() | |||
|
|||
// Tune changes the capacity of this pool. | |||
Tune(int) |
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.
does this change solve something?
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.
neofs-node/pkg/local_object_storage/engine/control.go
Lines 204 to 206 in b13fa5a
for _, pool := range e.shardPools { | |
pool.Tune(int(e.shardPoolSize)) | |
} |
e.shardPools
are WorkerPools
, and I need to Tune
.
cmd/neofs-node/config.go
Outdated
@@ -860,6 +875,10 @@ func (c *cfg) configWatcher(ctx context.Context) { | |||
|
|||
c.shared.policer.Reload(c.policerOpts()...) | |||
|
|||
// Pool | |||
|
|||
c.reloadObjectPoolSizes() |
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.
can you, please, put it before // Policer
or even // Logger
? imo it would be more convenient: first some internal things and then a series of Reload()
Conflicts. |
Refs #1770. Signed-off-by: Andrey Butusov <[email protected]>
Signed-off-by: Andrey Butusov <[email protected]>
Change sizes of the `replication` and `putRemote` pools. Refs #1770. Signed-off-by: Andrey Butusov <[email protected]>
32dce46
to
b40b85c
Compare
Get new pool sizes from these fields in config:
object.put.pool_size_remote
replicator.pool_size
(but I noticed that it is immediately overwritten by this function, maybe I should also reloadpolicer.max_workers
?)storage.shard_pool_size
Refs #1770.