forked from TrueCloudLab/frostfs-node
[#1667] shard: Drop shard pool
After adding an ops limiter, shard's `put` pool is redundant. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
597bce7a87
commit
2005fdda09
20 changed files with 71 additions and 171 deletions
|
@ -153,16 +153,10 @@ func (e *StorageEngine) Close(ctx context.Context) error {
|
|||
}
|
||||
|
||||
// closes all shards. Never returns an error, shard errors are logged.
|
||||
func (e *StorageEngine) close(ctx context.Context, releasePools bool) error {
|
||||
func (e *StorageEngine) close(ctx context.Context) error {
|
||||
e.mtx.RLock()
|
||||
defer e.mtx.RUnlock()
|
||||
|
||||
if releasePools {
|
||||
for _, p := range e.shardPools {
|
||||
p.Release()
|
||||
}
|
||||
}
|
||||
|
||||
for id, sh := range e.shards {
|
||||
if err := sh.Close(ctx); err != nil {
|
||||
e.log.Debug(ctx, logs.EngineCouldNotCloseShard,
|
||||
|
@ -213,7 +207,7 @@ func (e *StorageEngine) setBlockExecErr(ctx context.Context, err error) error {
|
|||
return e.open(ctx)
|
||||
}
|
||||
} else if prevErr == nil { // ok -> block
|
||||
return e.close(ctx, errors.Is(err, errClosed))
|
||||
return e.close(ctx)
|
||||
}
|
||||
|
||||
// otherwise do nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue