shard: ReviveObject does not update shard metrics

Abierto
#4,309 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
37
Forks
56
Merge medio
1 d 21 h
PR fusionados (30 d)
46

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nspcc-dev/neofs-node

Todos los issues de nspcc-dev/neofs-node

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.