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

Execute program when required after updating IdMap #10939

Closed
wants to merge 1 commit into from

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented Aug 30, 2024

Pull Request Description

close #10897

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@4e6 4e6 added the CI: No changelog needed Do not require a changelog entry for this PR. label Aug 30, 2024
@4e6 4e6 self-assigned this Aug 30, 2024
@4e6
Copy link
Contributor Author

4e6 commented Aug 30, 2024

Related #10898

@4e6
Copy link
Contributor Author

4e6 commented Aug 30, 2024

@hubertp can you check that it fixes the issue for you? Not sure how to write a test because we don't have access to the runtime context in tests

@4e6
Copy link
Contributor Author

4e6 commented Aug 30, 2024

In the end, I was able to reproduce the issue on #10898 branch with

sbt:enso> runtime-integration-tests/testOnly *RuntimeVisualizationsTest -- -z "emit visualization update for the target of a method call (subexpression)"

The issue is that AttachVisualizationCommand is executed asynchronously before the EditFileCmd. In case of attaching visualization to subexpression, we need to clear the caches of the expression whose ID will be assigned during the delayed EditFileCmd. Thus the caches are not cleared.

This PR addresses a different case.

@4e6 4e6 closed this Aug 30, 2024
@4e6 4e6 deleted the wip/db/10897-race-condition-when-updating-idmap branch September 13, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race-condition when updating idmap and attaching a visualization
1 participant