-
Notifications
You must be signed in to change notification settings - Fork 318
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
Synchronize suggestions loading after the reconnect #9043
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be grateful for some clarification
@@ -33,6 +32,7 @@ public Future<BoxedUnit> executeAsynchronously(RuntimeContext ctx, ExecutionCont | |||
TruffleLogger logger = ctx.executionService().getLogger(); | |||
long writeCompilationLockTimestamp = ctx.locking().acquireWriteCompilationLock(); | |||
try { | |||
ctx.jobControlPlane().stopBackgroundJobs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this confusing - we stop all background jobs only to abort some of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may look like an overkill. But here we stop running new background jobs for a brief moment to ensure that the deserialization jobs will not be executed before we clean the suggestions database. After the database is cleaned, we re-start the background jobs processing.
related #8689 Fixes a race between the language server SQL updating logic and the engine `DeserializeLibrarySuggestionsJob`s when the library suggestions may start loading before the database is properly cleaned up after the reconnect.
Pull Request Description
related #8689
Fixes a race between the language server SQL updating logic and the engine
DeserializeLibrarySuggestionsJob
s when the library suggestions may start loading before the database is properly cleaned up after the reconnect.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.