[PR #1673] [CLOSED] serve: heartbeat a request that waits for the turn (#1619) #3599

Closed
opened 2026-11-07 15:29:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1673
Author: @nekomario28
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: fix-1619-fifo-heartbeat


📝 Commits (2)

  • 5c0a197 serve: heartbeat a request that waits for the turn (#1619)
  • f706733 serve: wake queued requests without a polling delay

📊 Changes

2 files changed (+110 additions, -3 deletions)

View changed files

📝 serve/server.py (+29 -1)
📝 serve/test_server.py (+81 -2)

📄 Description

Fixes #1619.

Summary

Queued single-turn requests send an immediate heartbeat, then wait with Lock.acquire(timeout=FIFO_PING_S). The turn can start as soon as the holder releases it, without a polling sleep between requests. Closing a queued generator also returns its queued count.

The heartbeat interval remains 10 s by default (STRATA_FIFO_PING_S overrides it). Batch requests and status/history cleanup under the held lock are unchanged. No strict FIFO ordering guarantee is added.

Thanks to DDK00011 for reproducing the regressions and proposing the timed wait and queued cleanup. The test lock now accepts the real lock's timeout argument.

Test plan

  • New wake-up and generator-close regressions fail on the previous PR head and pass with the correction.
  • serve.test_quiet_cancel: 6 failing assertions before the correction; all 5 tests pass afterward.
  • Full serve/ discovery: 596 tests, no failures or errors, 8 skips (Linux, Python 3.14.7).
  • Not tested: GPU inference or external clients with idle timeouts. The suite uses CPU mocks and the native-pipe stand-in.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1673 **Author:** [@nekomario28](https://github.com/nekomario28) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-1619-fifo-heartbeat` --- ### 📝 Commits (2) - [`5c0a197`](https://github.com/Niko1221/Strata/commit/5c0a1971da3fa106fe1d3d4e8900a8d80b3d5047) serve: heartbeat a request that waits for the turn (#1619) - [`f706733`](https://github.com/Niko1221/Strata/commit/f706733a482a2bd3386e406f662d36339b9e0f62) serve: wake queued requests without a polling delay ### 📊 Changes **2 files changed** (+110 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+29 -1) 📝 `serve/test_server.py` (+81 -2) </details> ### 📄 Description Fixes #1619. ## Summary Queued single-turn requests send an immediate heartbeat, then wait with `Lock.acquire(timeout=FIFO_PING_S)`. The turn can start as soon as the holder releases it, without a polling sleep between requests. Closing a queued generator also returns its queued count. The heartbeat interval remains 10 s by default (`STRATA_FIFO_PING_S` overrides it). Batch requests and status/history cleanup under the held lock are unchanged. No strict FIFO ordering guarantee is added. Thanks to DDK00011 for reproducing the regressions and proposing the timed wait and queued cleanup. The test lock now accepts the real lock's `timeout` argument. ## Test plan - New wake-up and generator-close regressions fail on the previous PR head and pass with the correction. - `serve.test_quiet_cancel`: 6 failing assertions before the correction; all 5 tests pass afterward. - Full `serve/` discovery: 596 tests, no failures or errors, 8 skips (Linux, Python 3.14.7). - Not tested: GPU inference or external clients with idle timeouts. The suite uses CPU mocks and the native-pipe stand-in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3599
No description provided.