Avoid restarting the query server while there are running queries
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
- typescript
- Área
- devtools
Línea de trabajo
No se indican archivos ni pruebas. Empieza por localizar el cliente de query-server, sus callbacks de operaciones pendientes y el flujo de configuración de query-server; después, rastrea cómo los cambios en la configuración provocan un reinicio. Se considera terminado cuando, después de un cambio de configuración con operaciones pendientes, se muestra un popup de confirmación no modal, mientras se permiten nuevas consultas y se proporciona un botón para reiniciar y cancelar las consultas actuales.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Currently, if someone changes any query server settings, the query server is immediately stopped. Any running queries will complete with an error.
It should be possible to avoid restarting the server while there are running queries. The way that the query-server client is implemented, there are callbacks registered for any query or operation that is currently running. When completed, the callback is removed. Every time, after a callback is removed, we can check if the list of open callbacks is empty, and only then restart the server.
There are several potential edge cases to consider:
- If there is a zombie callback that is registered even though the thing it is registered for is no longer calling back, it will never be removed and the query server will never restart. This shouldn't happen, but we have nothing in place to ensure this.
- Consider the following pattern:
- User starts query1
- User changes a query server setting
- Query server restart is registered and is waiting for query1 to complete
- User starts query2. Query server restart is now waiting for both query1 and query2 to start
It may be confusing for a user that their next query is using the old settings even though they requested a change.
For (1), perhaps we can set a timeout where if there are no callbacks triggered after X seconds, we assume they are all zombies and restart anyway. Long running queries will still invoke the callbacks on a regular basis, so this is safe.
For (2), I am less certain. Perhaps we can prevent starting new queries if a server restart is requested.
EDIT- After discussion with @adityasharad the simplest implementation that will suit are purposes is:
After editing any of the query server settings and there are server operations outstanding, open a popup saying something like: "Settings will not come into effect until the query server is restarted. Restart now? (This will cancel any currently executing queries.)" And add a button on the popup that triggers the restart.
The popup should be non-modal, allowing a user to potentially run new queries under the old settings. This is OK because it is clear what is happening.
- Lenguaje dominante
- TypeScript
- Estrellas
- 539
- Forks
- 240
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 37
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 github/vscode-codeql
-
bug VSCode
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/vscode-codeql#4471 · 1 comentario ·
-
bug enhancement VSCode
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/vscode-codeql#592 · 2 comentarios ·
-
enhancement VSCode
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
github/vscode-codeql#4432 · 1 comentario ·
-
bug VSCode
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
github/vscode-codeql#4339 · 1 comentario ·
Todos los issues de github/vscode-codeql
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
carbon-design-system/ibm-products#9907 ·