Skip to content

perf(precompute): parallelize independent series updates - #602

Merged
zzylol merged 1 commit into
mainfrom
perf/593-concurrent-series-updates
Sep 4, 2026
Merged

zzylol merged 1 commit into
mainfrom
perf/593-concurrent-series-updates

Conversation

@zzylol

@zzylol zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Closes #593.

Splits synchronization into a generation barrier plus per-series ownership:

  • established series take the window generation read lock and their own entry lock;
  • independent series mutate concurrently;
  • same-series updates remain serialized;
  • new admission still takes the structural write lock;
  • rotation/drain take the write lock and therefore wait for all in-flight entry mutations before detaching the generation;
  • eviction-index updates use a narrow auxiliary lock only when EvictOldest is active.

Adds a RunParallel established-series benchmark. Review-host result: ~138 ns/op, zero allocs/op at 64-way benchmark parallelism. go test -race . passes.

Stacked on #601.

@zzylol
zzylol force-pushed the perf/592-indexed-series-eviction branch from c82593c to 2c7ed60 Compare September 4, 2026 12:08
@zzylol
zzylol force-pushed the perf/593-concurrent-series-updates branch from 6ab0a45 to a9226fe Compare September 4, 2026 12:08
@zzylol
zzylol force-pushed the perf/592-indexed-series-eviction branch from 2c7ed60 to a00f09d Compare September 4, 2026 12:09
@zzylol
zzylol force-pushed the perf/593-concurrent-series-updates branch from a9226fe to 4c14442 Compare September 4, 2026 12:09
@zzylol
zzylol changed the base branch from perf/592-indexed-series-eviction to main September 4, 2026 12:35
@zzylol
zzylol merged commit 2f4129b into main Sep 4, 2026
1 check passed
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.

asap-precompute-go: shard window state to avoid serializing every series update

1 participant