Completion holds the read lock while it waits for `textDocument/completion`

Abierto
#2,018 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Start with LSPCompletionContributor.fillCompletionVariants, identified at line 81, and trace how its wait for textDocument/completion interacts with cancellation when a write action is waiting. The issue reports the freeze on 0.21.0 and says it has not been reproduced on 0.30.0; reproduce or investigate that behavior before choosing a fix. Done means a waiting completion no longer holds up the write action and other contributors' items remain available when the server is slow.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug completion not reproducible performance

The freeze Report 2101980159656853504 in #2014 (LSP4IJ 0.21.0, IntelliJ IDEA 262.8665.258, at startup, IDE killed after 40 s, probable cause LONG_READ_ACTION) is the completion thread waiting for textDocument/completion while it holds the read lock:

ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:374)
LSPCompletionContributor.fillCompletionVariants(LSPCompletionContributor.java:81)
CompletionService.getVariantsFromContributor(CompletionService.java:135)
...
CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:1036)

The EDT was waiting for the write lock, but the completion's progress wasn't cancelled for 40 s, so awaitWithCheckCanceled kept waiting for the server.

In 0.30.0: unchanged. The wait is still at line 81; 2a5d0420 only made it null-safe. I haven't reproduced the freeze on 0.30.0 yet.

Possible fix: bound the wait and return no LSP items when the server takes longer, so that the completion still shows the items of the other contributors; or find out why a waiting write action doesn't cancel the completion's progress here.

Lenguaje dominante
Java
Estrellas
360
Forks
125
Merge medio
14 h 13 min
PR fusionados (30 d)
189

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de redhat-developer/lsp4ij

Todos los issues de redhat-developer/lsp4ij

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.