node-firestore-import-export icon indicating copy to clipboard operation
node-firestore-import-export copied to clipboard

Fixed batchExecutor to not be useless

Open m417z opened this issue 4 years ago • 5 comments

Promise.all() doesn't trigger the promises to start their work, creating the promise itself does. Reference: https://stackoverflow.com/a/40639551

Currently, all batchExecutor does is waiting for the promises in chunks, but they're still all executed in parallel. This pull request changes the code so that instead of (already running) promises, promise generator functions are passed, so that the promises are created (and actually executed) in chunks.

Another unfixed issue is that batchExecutor is used recursively, so if the batch limit is, say, 50, and the tree depth is 3, the limit is actually 50^3=125000 since each batchExecutor instance manages its own limit.

m417z avatar Mar 20 '20 21:03 m417z

👍 this would be great to have!

themikejr avatar May 19 '20 14:05 themikejr

+1

How can we make this happen?

GeoDirk avatar May 20 '20 20:05 GeoDirk

Would be nice to solve merge conflicts

Lusitaniae avatar Jul 09 '21 09:07 Lusitaniae

@jloosli Could you possibly give extra people write access?

@m417z and @Endran look like reasonable options as previous contributors.

Lusitaniae avatar Jul 09 '21 10:07 Lusitaniae

@Lusitaniae done. Hopefully @jloosli will merge it soon to avoid more conflicts in the future. @jloosli is there anything preventing from merging this pull request?

m417z avatar Jul 09 '21 10:07 m417z