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

[DYN-2206] Reset engine on scheduler thread upon creation of new workspace #10687

Merged
merged 2 commits into from
May 22, 2020

Conversation

aparajit-pratap
Copy link
Contributor

@aparajit-pratap aparajit-pratap commented May 20, 2020

Purpose

Brings back the changes proposed in #10113, the difference being that now we are being careful to reset the engine on the scheduler thread so that in the context of D4R, the engine reset and consequently any Revit element cleanup takes place as a transaction on the Revit idle thread thus preventing the crash in #10281.

As mentioned in #10113, this also fixes https://jira.autodesk.com/browse/DYN-1021.

Declarations

This fix has been tested with the Revit-Dynamo samples in Revit2020 and the crash is no longer reproducible. To verify I have tried doing the reset outside of the scheduler thread and have been able to reproduce the crash with the same steps.

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

Reviewers

@DynamoDS/dynamo

@mjkkirschner
Copy link
Member

@aparajit-pratap this looks good, is there anyway to test this in core?

@aparajit-pratap
Copy link
Contributor Author

@aparajit-pratap this looks good, is there anyway to test this in core?

@mjkkirschner I've added a test to verify that function definitions are cleared on creating a new workspace.

@aparajit-pratap aparajit-pratap added the PTAL Please Take A Look 👀 label May 21, 2020
@reddyashish
Copy link
Contributor

Looks good to me.

@reddyashish reddyashish added the LGTM Looks good to me label May 21, 2020
@aparajit-pratap aparajit-pratap removed the PTAL Please Take A Look 👀 label May 21, 2020
Copy link
Collaborator

@mmisol mmisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@aparajit-pratap aparajit-pratap merged commit af9cb10 into DynamoDS:master May 22, 2020
@aparajit-pratap aparajit-pratap deleted the resetEngine branch May 22, 2020 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants