shard: ReviveObject does not update shard metrics

Aperta
#4,309 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
databases

Direzione di ricerca

Start in pkg/local_object_storage/shard/revive.go at Shard.ReviveObject, then read metabase.ReviveObject in pkg/local_object_storage/metabase/revive.go around the gc counter decrement and reviveCounters. Compare with how deleteObjs applies a CountersDiff to the shard gauges. Done when a revive updates the object_counter, engine_payload_size and container_size metrics to match the metabase counters, with a test covering it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Current Behavior

Shard.ReviveObject (shard/revive.go#L22) calls metabase.ReviveObject. That call changes the metabase counters: gc -1 at metabase/revive.go#L125, plus phy/root/payload through reviveCounters. It returns only a ReviveStatus and no CountersDiff, so the shard never adjusts its gauges. After a revive, neofs_node_object_counter{type="gc"} stays one too high for good, because the mark is removed and nothing will ever decrement it. neofs_node_engine_payload_size and container_size stay low by the object's payload, so a later delete pushes them down further.

Expected Behavior

The gauges follow the metabase counters through a revive, the same way they do through put, delete and mark.

Possible Solution

Have metabase.ReviveObject return the CountersDiff it applies, and apply it in Shard.ReviveObject like deleteObjs does.

Context

This can only happen through the control service (object revive). Found while analysing #4308.

Lingua principale
Go
Stelle
37
Fork
56
Merge medio
1g 21h
PR unite (30g)
46

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nspcc-dev/neofs-node

Tutte le issue di nspcc-dev/neofs-node

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.