Skip to content

bug(rush-lib,operation-weighting): UNASSIGNED_OPERATION causing memory leak #4684

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

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Fixes a bug where cobuilds would cause a GC error when waiting for long periods of time.",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const UNASSIGNED_OPERATION: 'UNASSIGNED_OPERATION' = 'UNASSIGNED_OPERATIO

export type IOperationIteratorResult =
| OperationExecutionRecord
| { weight: 0; status: typeof UNASSIGNED_OPERATION };
| { weight: 1; status: typeof UNASSIGNED_OPERATION };

/**
* Implementation of the async iteration protocol for a collection of IOperation objects.
Expand Down Expand Up @@ -166,7 +166,7 @@ export class AsyncOperationQueue
// remote executing operation which is not ready to process.
if (queue.some((operation) => operation.status === OperationStatus.RemoteExecuting)) {
waitingIterators.shift()!({
value: { weight: 0, status: UNASSIGNED_OPERATION },
value: { weight: 1, status: UNASSIGNED_OPERATION },
done: false
});
}
Expand Down
Loading