forked from TrueCloudLab/frostfs-node
[#745] gc: Stop GC work on Shard
's Close
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
6527f9157c
commit
3d981320c6
3 changed files with 23 additions and 7 deletions
|
@ -39,9 +39,10 @@ func (s *Shard) Init() error {
|
|||
}
|
||||
}
|
||||
|
||||
gc := &gc{
|
||||
gcCfg: s.gcCfg,
|
||||
remover: s.removeGarbage,
|
||||
s.gc = &gc{
|
||||
gcCfg: s.gcCfg,
|
||||
remover: s.removeGarbage,
|
||||
stopChannel: make(chan struct{}),
|
||||
mEventHandler: map[eventType]*eventHandlers{
|
||||
eventNewEpoch: {
|
||||
cancelFunc: func() {},
|
||||
|
@ -53,7 +54,7 @@ func (s *Shard) Init() error {
|
|||
},
|
||||
}
|
||||
|
||||
gc.init()
|
||||
s.gc.init()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -74,5 +75,7 @@ func (s *Shard) Close() error {
|
|||
}
|
||||
}
|
||||
|
||||
s.gc.stop()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue