[Feature]: A checkpoint that stores an actor without suspending it

Abierto
#3,299 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kubernetes

Línea de trabajo

Read the existing SuspendActor flow and its DurabilityMode handling, then inspect how suspended snapshots are uploaded to object storage. The issue proposes CheckpointActor or a SuspendActor option that captures a snapshot and resumes the actor while upload continues. Done means a busy actor can gain a new durable snapshot without being suspended; the issue names no files or tests, so first locate those entry points and related tests.

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

Descripción

area/api area/api-machinery area/node area/storage kind/feature
What we'd like

A way to store a durable snapshot of an actor while it keeps running: a checkpoint that doesn't suspend it, uploaded to object storage the way a suspend's snapshot is.

Why

We run Substrate v0.6.0 on GKE as the sandbox for agent sessions: each session is an actor, suspended when it goes idle and resumed at the next message. Today an actor's state is stored only by suspending it (SuspendActor, with DurabilityMode synchronous or asynchronous). DrainWorker deliberately leaves bound actors alone, so draining a node stores nothing.

So an actor that stays busy is never stored. An agent turn can run for 40 minutes, or a user can send messages a minute apart for an hour. If GKE replaces the node during that stretch (a routine node upgrade replaces every node in turn), the actor goes back to its last suspend, and everything since is lost.

Suspending the actor between requests isn't a substitute:

  • a suspend in the middle of a request cancels it (#1572), and a long turn has no gap between requests;
  • suspending and resuming a chatty actor every few minutes charges each of those messages a resume.
What it would look like

Something like a CheckpointActor (or a SuspendActor option that resumes the actor once the snapshot is captured on the node), whose snapshot then uploads in the background and becomes the actor's latest durable one. A client could then store a busy actor on a schedule, or between turns, and bound what a node replacement costs.

Related: #2470 (resuming an actor whose node is gone), which is the other half of surviving a node replacement.

Lenguaje dominante
Go
Estrellas
5.9k
Forks
637
Merge medio
2 d 1 h
PR fusionados (30 d)
523

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 agent-substrate/substrate

Todos los issues de agent-substrate/substrate

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.