Difficult to use one session per request (e.g. gateway request)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- go
- Área
- backend, distributed-systems
Línea de trabajo
Comienza leyendo las alternativas de boxo#563, boxo#561, kubo#7198 y #549; después, sigue cómo se describen en el issue los creadores de sesiones, los consumidores y las capas intermediarias. Se considera completado cuando se haya seleccionado y documentado una dirección concreta para conservar una sesión lógica por solicitud, abordando al mismo tiempo la limpieza y las interacciones con blockservice-wrapper.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Background
The point of data transfer sessions is to handle the logic around discovering peers that might have the data you need and which peers to ask for which subset of the data. It does this by making assumptions/guesses around the association of various requests (i.e. these 10 block requests are all associated with the same HTTP gateway request). Historically getting the plumbing right here to actually have one session in code per logical session has been a pain resulting in multiple sessions being created within single requests (e.g. gateway requests).
On top of this long standing issue we're also seeing some issues with blockservice wrappers not working nicely with sessions https://github.com/ipfs-shipyard/nopfs/issues/34 due to how the abstraction layers are entangled.
Options
There have been a few recent and older proposals, most of them involve embedding session information in the context (e.g. https://github.com/ipfs/kubo/issues/7198, #549 although it's incomplete on it's own).
Some of the concrete approaches some of them (along with a brief description) are:
- https://github.com/ipfs/boxo/pull/563 -> Put the concept of sessions in the blockservice interface
- https://github.com/ipfs/boxo/pull/561 -> Remove the abstraction of a blockservice interface and whenever someone needs more functionality it means more options passed into the boxo.BlockService struct's constructor
- https://github.com/ipfs/kubo/issues/7198 -> Make the concept of sessions global, but basically just a uint64, individual layers of the stack (e.g. bitswap or something higher level if that emerges) can then choose to locally associate state with
- Do nothing (pre #549) -> Make the user create a shallow clone of the stack of components for every session
Analysis
- Doing nothing/asking the user to create one "stack" per request isn't working
- #561 is less flexible than #563
The main difference between #561 and https://github.com/ipfs/kubo/issues/7198 is a tradeoff between cleanup complexity and adding more propagation of sessions everywhere.
- #563
- When the context gets cleaned up by Go's GC the session object will get cleaned up as well
- Sessions need to be handled by: Session consumers (e.g. bitswap), Session creators (e.g. gateway), everything in between (e.g. boxo.blockservice, nopfs, dagservice, fetcher, etc.)
- https://github.com/ipfs/kubo/issues/7198
- Needs to manually manage and synchronise state (
uint64→*session) in all session consumers - A goroutine would need to get spun up to handle cleanup on context cancellation.
- Could be a long lived one (as is currently the case in the bitswap implementation) or a short lived one via https://pkg.go.dev/context#AfterFunc
- Sessions need to be handled by: Session consumers (e.g. bitswap), Session creators (e.g. gateway)
- Needs to manually manage and synchronise state (
Let's decide which change to make going forward.
- Lenguaje dominante
- Go
- Estrellas
- 326
- Forks
- 165
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ipfs/boxo
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 46/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
need/triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
-
dif/medium effort/hours kind/enhancement P3 topic/devexp
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Issues similares
-
area/networking kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
siderolabs/talos#14972 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
kubectl wait outputs cryptic "error: unrecognized condition: []" when --for is omittedPosiblemente ocupada @muskan-creates352 la tomó hoy. Abiertokind/bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
kubernetes/kubectl#1910 · 1 comentario ·
-
Add Shiro (Remote) MCP serverAbiertoneeds-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
stacklok/toolhive-catalog#1967 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
unbound-force/gaze#353 ·
Los mantenedores suelen responder en 1 día