You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "PDGGK (via GitHub)" <gi...@apache.org> on 2026/07/22 07:34:59 UTC

[PR] Fix executeConcurrent successCount when stopping on error [iotdb-client-nodejs]

PDGGK opened a new pull request, #18:
URL: https://github.com/apache/iotdb-client-nodejs/pull/18

   ### Problem
   `executeConcurrent(..., { stopOnError: true })` returns `successCount: items.length - errors.length`. When `stopOnError` trips, the worker loop stops and the remaining items are never attempted — they are neither successes nor failures, but the formula counts them all as successes (e.g. concurrency 1, first item throws → 0 operations complete, 1 error, but `successCount === 9`). A caller trusting `successCount` believes 9 operations succeeded when 9 were never attempted.
   
   ### Fix
   Return `completedCount`, which is incremented only after an operation resolves successfully. For the non-stopOnError paths `completedCount === items.length - errors.length`, so existing behavior is unchanged; only the stop-on-error case is corrected.
   
   ### Tests
   Added a regression case asserting `successCount === 0` when the first item fails with `stopOnError`. Full `tests/unit` suite green (155 tests).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix executeConcurrent successCount when stopping on error [iotdb-client-nodejs]

Posted by "CritasWang (via GitHub)" <gi...@apache.org>.
CritasWang merged PR #18:
URL: https://github.com/apache/iotdb-client-nodejs/pull/18


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org