You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
For a large number of records (600 to be exact, not sure why that is the magic number), toArray() fails and throws a Recursive process.nextTick detected error for each record (full stack trace at bottom).
We were able to create a minimal repro by adding a test similar to the toArray test, just with more records (also available in our fork branch):
it('should be able to handle lots of documents',asyncfunction(){constdocsToInsert=[],numDocs=600;for(leti=0;i<numDocs;i++){docsToInsert[i]={
i,name: `Pokemon ID #${i}`};}awaitcollection.insert(docsToInsert);letresult=awaitcollection.find().toArray();expect(result).to.be.an.instanceof(Array);expect(result.length).to.equal(numDocs);});
I suspect this has to do with the asyncwhile loop, however, I am unable to get the error to repro with a minimal Babel REPL, even with a high result count.
Here is the stack trace for each loop iteration:
Trace: (node) warning: Recursiveprocess.nextTickdetected.Thiswillbreakinthenextversionofnode.PleaseusesetImmediateforrecursivedeferral.atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atConsole.warn(console.js:62:16)atConsole.trace(console.js:122:8)atmaxTickWarn(node.js:410:17)atprocess._nextTick[as_currentTickHandler](node.js:513:9)atprocess.nextTick(node.js:364:15)atonwrite(_stream_writable.js:266:15)atWritableState.onwrite(_stream_writable.js:97:5)atWriteStream.Socket._write(net.js:654:5)atdoWrite(_stream_writable.js:226:10)atwriteOrBuffer(_stream_writable.js:216:5)atWriteStream.Writable.write(_stream_writable.js:183:11)atWriteStream.Socket.write(net.js:616:40)atObject.exports.cursor.deleteLine(C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\reporters\base.js:137:30)atObject.exports.cursor.CR(C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\reporters\base.js:146:22)atRunner.<anonymous>(C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\reporters\spec.js:67:14)atRunner.emit(events.js:117:20)
at C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\runner.js:547:14atdone(C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\runnable.js:247:5)
at C:\Users\C\AppData\Roaming\nvm\v0.10.38\node_modules\mocha\lib\runnable.js:291:11atrun(C:\htdocs\promised-mongo\node_modules\babel\node_modules\babel-core\node_modules\core-js\modules\es6.promise.js:89:39)
at C:\htdocs\promised-mongo\node_modules\babel\node_modules\babel-core\node_modules\core-js\modules\es6.promise.js:100:28atflush(C:\htdocs\promised-mongo\node_modules\babel\node_modules\babel-core\node_modules\core-js\modules\$.microtask.js:17:13)atprocess._tickCallback(node.js:448:13)
The text was updated successfully, but these errors were encountered:
For a large number of records (600 to be exact, not sure why that is the magic number),
toArray()
fails and throws aRecursive process.nextTick detected
error for each record (full stack trace at bottom).We were able to create a minimal repro by adding a test similar to the
toArray
test, just with more records (also available in our fork branch):I suspect this has to do with the
async
while
loop, however, I am unable to get the error to repro with a minimal Babel REPL, even with a high result count.Here is the stack trace for each loop iteration:
The text was updated successfully, but these errors were encountered: