BinlogStreamer could block forever due to unconfigurable caughtupThreshold

Abierto
#5 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
go

Línea de trabajo

Start with ferry.go lines 254-258 and trace the caughtupThreshold loop and IsAlmostCaughtUp behavior. Review the discussion about a configurable deadline, aborting the move, and ControlServer-triggered cutover; done means an agreed behavior is implemented without forcing a disruptive cutover by default.

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

Descripción

Originally by @hkdsun:

See https://github.com/Shopify/ghostferry/blob/be4f15d/ferry.go#L254-L258

In the situation where the source database is under very heavy load, such that ghostferry is always caughtupThreshold behind on writing data to the target, we could stay in that loop for a potentially really long time.

An idea is to have the function accept a configurable deadline. Once the deadline is reached, either abort the run or force the application to stop writes on the source (i.e. forcefully initiate the cutover phase).

Comment by @shuhaowu:

I would like to add, we could also add an API to dynamically force a cutover to occur (i.e. make IsAlmostCaughtUp return true always), perhaps triggerable via the ControlServer.

Comment by @fw42:

I think I'd prefer to abort the move rather than to force the cutover, at least as the default behaviour. If the source database has so many writes that we can't catch up, that probably means that it's very active right now. Locking the source database would be very disruptive at that moment.

Lenguaje dominante
Go
Estrellas
858
Forks
77
Merge medio
10 d 4 h
PR fusionados (30 d)
4

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

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 Shopify/ghostferry

Todos los issues de Shopify/ghostferry

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.