bug(rush-lib,operation-weighting): UNASSIGNED_OPERATION causing memory leak #4684
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Followup to #4672
Having a weight of 0 for UNASSIGNED_OPERATION was causing a build up of objects for the instance that was waiting. This quickly causes a GC error, locally I can trigger it in 30 seconds, in our CI it's about 2 mins.
Details
I tried to upgrade our cobuild instance this morning and ran into this issue. Monkeypatching the weight to 1 locally fixes the issue.
This is caused by the weight of 0 being an immediate execution, UNASSIGNED_OPERATIONs must have an actual weight so the process is stuck waiting for some time.
How it was tested
Tested this in our internal rush instance, I also tested this with the cobuild test project by setting the timeout in the
build.js
script to a long interval (2000 seconds). The instance that is waiting will throw a GC error pretty quickly.With this change, the waiting process is stable and doesn't cause a GC error.
Impacted documentation
None.