Add parEvalMapPartitioned - concurrent eval with per-key ordering
Los mantenedores suelen responder en 3 días
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
- scala
- Área
- backend, distributed-systems
Línea de trabajo
Read the prototype linked in the issue and compare it with fs2's existing parEvalMap implementation and tests. The proposed operation needs per-key ordering, concurrency and buffering limits, and ordered result emission; the issue also raises unresolved API choices around key equality, overloads, naming, and aliases. Done means those semantics and API questions are resolved and the implementation is covered by tests, including the stated ordered-mode hang.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Elements with the same key run one at a time, in arrival order. Other keys run concurrently, and results are emitted in input order. Akka and Pekko have this as mapAsyncPartitioned.
records
.parEvalMapPartitioned(maxConcurrent = 32, maxBuffered = 512)(_.record.key) {
(committable, _) => processRecord(committable.record).as(committable.offset)
}
.through(commitBatchWithin(500, 15.seconds))
maxConcurrent limits running effects, for example to a connection pool's size. maxBuffered limits the elements held, including those waiting for their key or to be emitted. There is also a single-limit overload and parEvalMapPartitionedUnordered.
I have a prototype built on parEvalMap here. If an effect fails, later elements with that key are skipped. If an effect fails, the stream terminates with that error, as with parEvalMap. Until then, later elements with the same key aren't evaluated.
It inherits the hang from #3486 in ordered mode.
Questions:
- Would you want this in fs2 (I personally need this for processing records from kafka using fs2-kafka)?
EqorHashfor keys? The prototype usesEq, with a linear scan over keys in progress.- Is
maxBufferedthe right name, and should the single-limit overload stay? - Should there be
mapAsyncPartitionedaliases? The prototype has none, because Akka's second parameter isperPartition, somapAsyncPartitioned(32, 40)would silently mean something different.
- Lenguaje dominante
- Scala
- Estrellas
- 2.5k
- Forks
- 633
- Merge medio
- 3 d 21 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 typelevel/fs2
-
Reading from a socket gets stuck on Node.js 26Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Scala Native TLSSocket#applicationProtocol behavior is inconsistent with JVMPosiblemente ocupada @reardonj la tomó hace 24 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
Los mantenedores suelen responder en 3 días
-
Feature Proposal: report progress writing to socketsPosiblemente ocupada @reardonj la tomó hace 31 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
typelevel/fs2#3719 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 3 días
Todos los issues de typelevel/fs2
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
requires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
apache/datafusion-comet#7559 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
propensive/soundness#2438 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ergoplatform/ergo#2918 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
lichess-org/lila#22440 ·
Los mantenedores suelen responder en 1 día