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

HotFix for Critical sync error: RangeError: Maximum call stack size exceeded #4969

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

mnaamani
Copy link
Contributor

We had a case where a new storage node was doing an initial sync. The number of objects to sync was around 380,000.
Sync tasks being added was using pattern Array.push(...tasks) this results in a call to Array.push(....) with 380,000 arguments which are all added to the javascript call stack which throws an exception, this resulted in the node never being able to complete a sync run.

The fix is to just iterate over the tasks array elements and push them individually into the target array.

Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for investigating & fixing this issue. Just a related point, I think we use the spread operator notation (i/e....tasks) in a number of places, so maybe we should find all the occurrences and add fixes (But that for some other task I think).

@mnaamani mnaamani merged commit 9c5383d into Joystream:master Nov 21, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants