Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
🤖 Augment PR SummarySummary: Fixes a subtle indexing race by preventing Changes: Replaces the process-wide cached bundle ( 🤖 Was this summary useful? React with 👍 or 👎 |
| // from multiple threads at once. Producing runs across a thread pool, so | ||
| // we keep the cache thread-local to give every worker its own bundle | ||
| // rather than sharing a single one across threads | ||
| thread_local std::unordered_map<const void *, std::unique_ptr<CacheEntry>> |
There was a problem hiding this comment.
cache is now thread_local and keyed by &configuration, so entries live for the lifetime of each worker thread; if Configuration objects are ever short-lived (or their addresses can be reused), this can lead to stale cache hits and/or unbounded per-thread growth.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Benchmark Index (community)
Details
| Benchmark suite | Current: a4cd077 | Previous: 0959497 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
387 ms |
328 ms |
1.18 |
Add one schema (100 existing) |
30 ms |
22 ms |
1.36 |
Add one schema (1000 existing) |
83 ms |
65 ms |
1.28 |
Add one schema (10000 existing) |
677 ms |
539 ms |
1.26 |
Update one schema (1 existing) |
23 ms |
16 ms |
1.44 |
Update one schema (101 existing) |
31 ms |
22 ms |
1.41 |
Update one schema (1001 existing) |
88 ms |
67 ms |
1.31 |
Update one schema (10001 existing) |
689 ms |
549 ms |
1.26 |
Cached rebuild (1 existing) |
7 ms |
4 ms |
1.75 |
Cached rebuild (101 existing) |
9 ms |
5 ms |
1.80 |
Cached rebuild (1001 existing) |
29 ms |
18 ms |
1.61 |
Cached rebuild (10001 existing) |
251 ms |
165 ms |
1.52 |
Index 100 schemas |
486 ms |
390 ms |
1.25 |
Index 1000 schemas |
1550 ms |
1284 ms |
1.21 |
Index 10000 schemas |
13900 ms |
10931 ms |
1.27 |
Index 10000 schemas (custom meta-schema) |
16848 ms |
13523 ms |
1.25 |
Index 10000 schemas ($ref fan-out) |
16701 ms |
13757 ms |
1.21 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark Index (enterprise)
Details
| Benchmark suite | Current: a4cd077 | Previous: 0959497 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
376 ms |
376 ms |
1 |
Add one schema (100 existing) |
32 ms |
32 ms |
1 |
Add one schema (1000 existing) |
87 ms |
86 ms |
1.01 |
Add one schema (10000 existing) |
666 ms |
675 ms |
0.99 |
Update one schema (1 existing) |
24 ms |
24 ms |
1 |
Update one schema (101 existing) |
31 ms |
31 ms |
1 |
Update one schema (1001 existing) |
85 ms |
86 ms |
0.99 |
Update one schema (10001 existing) |
678 ms |
686 ms |
0.99 |
Cached rebuild (1 existing) |
8 ms |
8 ms |
1 |
Cached rebuild (101 existing) |
10 ms |
10 ms |
1 |
Cached rebuild (1001 existing) |
33 ms |
33 ms |
1 |
Cached rebuild (10001 existing) |
275 ms |
274 ms |
1.00 |
Index 100 schemas |
615 ms |
469 ms |
1.31 |
Index 1000 schemas |
1550 ms |
1505 ms |
1.03 |
Index 10000 schemas |
13583 ms |
13530 ms |
1.00 |
Index 10000 schemas (custom meta-schema) |
15770 ms |
15954 ms |
0.99 |
Index 10000 schemas ($ref fan-out) |
16442 ms |
16125 ms |
1.02 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com