Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ce alone A job forwarded to a remote waits in the remote's queue and runs at the remote's pace, so timing it from the send would make this box look as slow as the remote's backlog. It is not timed today, because dispatch hands it on as its queued row. The new test ends a forwarded job after a long wait there and checks that the mean, the per-audio rate and the local slot's ETA stay as they were; passing the claimed row instead turns it red.
|
A review flagged that a job forwarded to a remote would feed its time, from the send to the end, into the new per-audio rate, so a fast box with a busy remote would publish the remote's backlog as its own pace and price its local slots with it. That does not happen. No test covered a forwarded job ending, so e381a10 adds one in |
Problem
A client that picks the fastest server reads
queue.eta_secondsandqueue.mean_job_secondsfrom/healthzor/v1/server, and both numbers can point it the wrong way.eta_secondswas the jobs left, in rounds ofserver.concurrency, times the mean running time of the last 50 jobs. It knew nothing about the job running now. With one long file running and nothing queued, the box reported one mean's worth of wait, a few seconds, while the file still had well over an hour left. A short note sent there waited behind it until its own deadline.mean_job_secondsis a plain per-job mean. After a few long files, a fast idle box shows a large mean and looks like the slowest one.Fix
seconds_per_audio_second: their running times summed over their audio summed. Long files no longer swing it. A failed job has no audio and counts in the mean only.mean_job_secondsstays as it was, for clients that read it.eta_secondsis now the longest of theconcurrencyslots. A slot starts with what its running job has left: the audio not yet done (total_s - done_sfrom its progress) times that rate, or the mean while its length is unknown (during decode, or before any job with audio is done). Each queued job adds the mean to the slot that frees first. A job out on a remote runs beside the slots, using the length and progress the remote reports (the remote'sdone_sis now kept too).queue_fullrefusal (SV-Q3) is unchanged.Docs: SV-Q4 points at a new SV-Q5 row in
docs/ux/SERVER.md, plus theGET /v1/serverdescription (docs/api/openapi.json, regenerated) anddocs/server-hardware.md.Evidence
tests/queue-eta.test.ts: the purequeueEtacases (one long file with an empty queue, unknowntotal_s, slots shared by short and long jobs, a remote job) and three cases on a liveJobService: a 300 s file running with an empty queue after 10 s of audio ran in 2 s readseta_seconds60; a remote job with 1000 s left reads 200, then 60 once the remote reports 900 s done; ten short notes plus four long files move the mean from about 1 s to over 160 s whileseconds_per_audio_secondstays 0.1.eta_secondsput back to the old formula, the long-file case reads 2 instead of 60 and the remote case times out; both fail.tests/job-queue.e2e.test.tschecks the field is a number on/v1/serverafter real jobs ran. The existing SV-Q4 ETA tests pass unchanged.