agent-substrate / agent-substrate/substrate

atenet-router: requests to running actors consume parking-lot slots

Open
#1,081 3 comments 0 reactions 0 assignees View on GitHub
area/network kind/bug
Dominant language
Go
Stars
1.8k
Forks
316
Avg merge
2d 43m
Merged PRs (30d)
287

Description

The parking lot admits every request, not just ones waiting for a resume: [HandleRequestHeaders](https://github.com/agent-substrate/substrate/blob/a0523de4e7e81a70734511b32665b3072d2d9682/cmd/atenet/internal/router/ingress/ingress.go#L119-L130) calls parking.enter() before ResumeActor, so even a request to a RUNNING actor holds a slot during its ateapi lookup.

This breaks the [design's own guarantee](https://github.com/agent-substrate/substrate/blob/main/docs/request-parking.md#behavior)
> a saturated lot cannot starve requests to already-running actors, at any lot size

[TestHandleRequestHeaders_ParkingLotFull](https://github.com/agent-substrate/substrate/blob/a0523de4e7e81a70734511b32665b3072d2d9682/cmd/atenet/internal/router/ingress/ingress_test.go#L343) explicitly asserts the contradicting behavior: a request to an already-running actor "is shed with a 503 before any resume is attempted" when the lot is full - i.e., the starvation the design doc says cannot happen is locked in as expected behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.