Skip to content

feat(enterprise): add trace processor SQL worker#88

Closed
Gracker wants to merge 1 commit intofeature/enterprise-multi-tenant-tp-proxyfrom
feature/enterprise-multi-tenant-sql-worker
Closed

feat(enterprise): add trace processor SQL worker#88
Gracker wants to merge 1 commit intofeature/enterprise-multi-tenant-tp-proxyfrom
feature/enterprise-multi-tenant-sql-worker

Conversation

@Gracker
Copy link
Copy Markdown
Owner

@Gracker Gracker commented May 8, 2026

Summary

  • Add a per-trace-processor SQL worker backed by worker_threads in source/dev and compiled dist paths, with inline fallback only for tests/custom executors.
  • Replace the old per-processor FIFO promise chain with a non-preemptive P0/P1/P2 priority queue: the running query is never interrupted, but queued P0 work dispatches before queued P1/P2 work.
  • Route WorkingTraceProcessor, ExternalRpcProcessor, manual SQL, and backend lease proxy /api/tp/:leaseId/query through the worker queue.
  • Add protobuf helpers for QueryArgs decode and QueryResult encode so raw proxy/test paths can preserve Perfetto HTTP RPC protobuf payloads.
  • Mark README §0.4.6 complete. §0.4.3 remains blocked on real 100MB / 500MB / 1GB trace benchmark coverage.

Stacking

Validation

  • cd backend && npx jest --runInBand src/services/__tests__/traceProcessorSqlWorker.test.ts src/services/__tests__/traceProcessorProtobuf.test.ts src/services/__tests__/workingTraceProcessor.enterpriseIsolation.test.ts src/routes/__tests__/traceProcessorProxyRoutes.test.ts
  • cd backend && npm run typecheck
  • cd backend && npm run build
  • source/dev worker_thread smoke with npx tsx
  • compiled dist/ worker_thread smoke with node dist/...
  • cd backend && npm run test:core
  • cd backend && npm run test:scene-trace-regression
  • npm run verify:pr
  • git diff --check

@Gracker
Copy link
Copy Markdown
Owner Author

Gracker commented May 9, 2026

已通过 commit 67856ec (merge) + 023a84a (frontend rebuild) 合入 main,关闭此 PR。

@Gracker Gracker closed this May 9, 2026
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