Skip to content

Stop the request pool pulling new work after a failure - #2281

Merged
kmcginnes merged 1 commit into
mainfrom
edge-stack/1-request-pool-fail-stop
Sep 25, 2026
Merged

kmcginnes merged 1 commit into
mainfrom
edge-stack/1-request-pool-fail-stop

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • mapWithConcurrency rejected on the first failure, but its other lanes kept looping and sending requests nobody was waiting for. The first rejection now stops the pool from starting new work. Callbacks already running aren't cancelled.
  • This also affects openCypher and SPARQL schema and edge connection fetches, which used to drain the whole queue after a failure.
  • Later in the stack, edge connection discovery relies on this, so abandoning an attempt actually stops it.

Validation

  • New test: after one callback rejects, no further callbacks start.
  • pnpm checks and pnpm test clean on this layer.

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@kmcginnes
kmcginnes marked this pull request as ready for review September 25, 2026 22:22
@kmcginnes
kmcginnes added this pull request to stack #2283 September 25, 2026 22:25
@kmcginnes
kmcginnes merged commit 1153c1f into main Sep 25, 2026
10 checks passed
@kmcginnes
kmcginnes deleted the edge-stack/1-request-pool-fail-stop branch September 25, 2026 22:35
kmcginnes added a commit that referenced this pull request Sep 25, 2026
## Description

- `mapWithConcurrency` rejected on the first failure, but its other
lanes kept looping and sending requests nobody was waiting for. The
first rejection now stops the pool from starting new work. Callbacks
already running aren't cancelled.
- This also affects openCypher and SPARQL schema and edge connection
fetches, which used to drain the whole queue after a failure.
- Later in the stack, edge connection discovery relies on this, so
abandoning an attempt actually stops it.

## Validation

- New test: after one callback rejects, no further callbacks start.
- `pnpm checks` and `pnpm test` clean on this layer.

## Related Issues

- Part of #2141 (split out of #2244)
- Layer 1 of 6. Stack, bottom first: #2281 → #2277 → #2278 → #2279 →
#2280 → #2282

### Check List

- [x] I confirm that my contribution is made under the terms of the
Apache 2.0 license.
- [x] I have verified `pnpm checks` passes with no errors.
- [x] I have verified `pnpm test` passes with no failures.
- [x] I have covered new added functionality with unit tests if
necessary.
- [x] I have updated documentation if necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant