Should streamz handle exceptions?
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
- python
- Área
- stream-processing
Línea de trabajo
Start by tracing how exceptions move through map, filter, zip, and emit, and review the existing subclassed-module approach described in the issue. Define a consistent exception-handling contract for stream operators, including how bad data is propagated or reported, then document the behavior and cover the affected paths with tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What do we do when a stream receives bad data that causes an exception to be raised. For ex:
def foo(x):
if x is None:
raise Exception
else:
return x + 1
s = Stream()
s2 = s.map(foo)
s3.sink(print)
s.emit(1)
s.emit(None)
s.emit(2)
Here, foo is a point of vulnerability in the stream, where it may or may not cause the whole stream architecture to halt.
Is it worth trying to incorporate some quiet exception handling? I am not sure exactly how to tackle this so I'm being a little vague at this point. I can think of many ways of doing this. Here are a few:
- Catch the exceptions and emit them somehow (will require defining a data type). We can also not emit (and perhaps sink errors to a global list) but this may cause unintended synchronization consequences to the user.
- catch the exceptions in
s.emit. Note that in this case catching the exception may be harder to find
I'll think about it, but I would like to hear opinions from @mrocklin and @CJ-Wright (who has already handled this in his streams extension). My current method is to wrap all mapped functions to look for exceptions, and return a document that flags the document as having encountered an exception. This works in my subclassed module only though. It would be nice to unify this I think.
(Note: exceptions can occur not just in map but other things like filter etc. Other modules like zip may also want to be exception aware, that something passing through is bad data, and pass this on etc.)
- Lenguaje dominante
- Python
- Estrellas
- 1.3k
- Forks
- 149
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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 python-streamz/streamz
-
pkg_resources warning Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
python-streamz/streamz#481 · 4 comentarios ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
python-streamz/streamz#480 · 2 comentarios ·
-
Compile the code into c++ Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-streamz/streamz#479 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-streamz/streamz#478 · 6 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 10/100
python-streamz/streamz#476 · 17 comentarios · 2 reacciones ·
Todos los issues de python-streamz/streamz
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
use-agent-os/agent-os#3314 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BasedHardware/omi#15662 · 1 comentario ·
-
documentation help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
AiursoftWeb/AnduinOS-2#19 ·