forked from TrueCloudLab/frostfs-node
[#1700] gc: Drop Event interface
There is only one event: new epoch. Change-Id: I982f3650f7bc753ff2782393625452f0f8cdcc35 Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
bc6cc9ae2a
commit
27899598dc
4 changed files with 47 additions and 94 deletions
|
@ -318,8 +318,6 @@ func (e *StorageEngine) SetShardMode(ctx context.Context, id *shard.ID, m mode.M
|
|||
|
||||
// HandleNewEpoch notifies every shard about NewEpoch event.
|
||||
func (e *StorageEngine) HandleNewEpoch(ctx context.Context, epoch uint64) {
|
||||
ev := shard.EventNewEpoch(epoch)
|
||||
|
||||
e.mtx.RLock()
|
||||
defer e.mtx.RUnlock()
|
||||
|
||||
|
@ -327,7 +325,7 @@ func (e *StorageEngine) HandleNewEpoch(ctx context.Context, epoch uint64) {
|
|||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case sh.NotificationChannel() <- ev:
|
||||
case sh.NotificationChannel() <- epoch:
|
||||
default:
|
||||
e.log.Debug(ctx, logs.ShardEventProcessingInProgress,
|
||||
zap.Uint64("epoch", epoch), zap.Stringer("shard", sh.ID()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue