Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: Retry indexing source file #5236

Merged
merged 1 commit into from May 18, 2023

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented May 17, 2023

Previously, if there was an issue indeing a file we would fail searching for the particular query. Now, we pack it into try an retry in case of errors such as filesystem ones.

Fixes #5231

Previously, if there was an issue indeing a file we would fail searching for the particular query. Now, we pack it into try an retry in case of errors such as filesystem ones.

Fixes scalameta#5231
@kasiaMarek
Copy link
Contributor

Seems reasonable, though I'm only wondering if the reindexing doesn't happen to fast. Let's say you really have a something else writing to that file which causes the error, shouldn't we wait a bit to let the other thread finish it's job?

@tgodzik
Copy link
Contributor Author

tgodzik commented May 18, 2023

Seems reasonable, though I'm only wondering if the reindexing doesn't happen to fast. Let's say you really have a something else writing to that file which causes the error, shouldn't we wait a bit to let the other thread finish it's job?

That might be right, but this is happening during resolving a completion item, so we can't wait. We could instead just not retry and the retry might happen next time when resolving an item. What do you think? Remove the retry? It might not be useful at all

@kasiaMarek
Copy link
Contributor

kasiaMarek commented May 18, 2023

What do you think? Remove the retry? It might not be useful at all

I have no intuition on usefulness of this retry. However, I don't see how it would be harmful.
You could inquire the user if the exception happened once or several times and if it caused any actually disfunction, if not then I also think it's normal for such things to happen. It's your call.

@tgodzik tgodzik merged commit cd9e842 into scalameta:main May 18, 2023
21 of 22 checks passed
@tgodzik tgodzik deleted the retry-indexing branch May 18, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.io.EOFException: Unexpected end of ZLIB input stream
2 participants