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.
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 toArray.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.