The 30-minute and daily ticks have no measured D1 query count against 1,000

Open
#2,776 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start by reading the D1 guard described in #2757 and the heartbeat ledger for milestone 0.10.74; the issue does not name their file paths or tests. Trace how the guard sees statements during an invocation and how tick data reaches the ledger. Done means recording per-invocation D1 query counts for 30-minute and daily ticks, treating a batch as one, and alerting when a tick exceeds a defined share of 1,000.

Written by the indexing model from the issue text.

Description

backend observability

Found by card A4 of the reliability-floor epic (#2757, issue #2591). #2591 asked for one count of the 30-minute tick's D1 statements against D1's 1,000 queries per Worker invocation.

From the code (computed, not measured): the 30-minute tick runs 17 jobs; 4 state a bound (identifier sweep 20, re-pull advance 141, compute advance 800, the derivative storing tick 100), summing to 1,061, and 13 state none. The 800 is a subrequest figure, so it only caps that job's D1 share. So the stated bounds cannot show that the tick fits in 1,000 D1 queries, and the daily tick has the same gap.

Proposed: measure instead of stating. The D1 guard of #2757 sees every statement of an invocation, so it can count queries per invocation (a batch as one) and the heartbeat ledger of milestone 0.10.74 can record that count per tick, with an alert when a tick passes a share of 1,000. Until then the count is unknown, not zero.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
4h 48m
Merged PRs (30d)
468

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nemarOrg/nemar-cli

All issues in nemarOrg/nemar-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.