Empty accelerated fields leads to TypeError
@Ickerday ya está trabajando en esto.
Desde el 13/11/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Describe the bug
def __getitem__(self, item):
res = Collection.__getitem__(self, item)
for k, v in res.content.items():
if "accelerated_fields" in k:
res.content[k] = json.loads(v)
return res
This code breaks if v is not a valid JSON string.
As there is no way to remove an acceleration other than setting it to empty, this is a typical case.
To Reproduce
Steps to reproduce the behaviour:
c.kvstore.create("test")
collection = c.kvstore["test"]
collection.update_accelerated_field("test", {"test": 1})
collection = c.kvstore["test"]
collection.update_accelerated_field("test", "")
collection = c.kvstore["test"]
Expected behaviour
Rather than an exception, the empty string is used as the value.
If I am allowed to dream, splunkd should provide a mechanism to remove accelerations and field configurations cleanly. However, this bug should still be fixed, as we never know what administrators might write in .conf files.
- Lenguaje dominante
- Python
- Estrellas
- 743
- Forks
- 387
- Merge medio
- 42 min
- PR fusionados (30 d)
- 4
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 splunk/splunk-sdk-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
splunk/splunk-sdk-python#835 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
splunk/splunk-sdk-python#831 · 1 comentario ·
-
Unverified SSL context Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
splunk/splunk-sdk-python#704 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
splunk/splunk-sdk-python#840 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
splunk/splunk-sdk-python#828 ·
Todos los issues de splunk/splunk-sdk-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
OpenHands/extensions#626 · 1 comentario ·
-
Change observation tooltip text Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
CSCfi/sd-search-api#39 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
please add to porn list Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
StevenBlack/hosts#3255 ·