Fix index crash on invalid $vocabulary#1013
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
🤖 Augment PR SummarySummary: Prevents index-time crashes when a metaschema/dialect provides an invalid 🤖 Was this summary useful? React with 👍 or 👎 |
| } | ||
|
|
||
| assert(vocabulary_entry->is_object()); | ||
| if (!vocabulary_entry->is_object()) { |
There was a problem hiding this comment.
Returning std::nullopt here makes an invalid $vocabulary indistinguishable from a missing keyword; callers (e.g. vocabularies() using value_or) may silently proceed with a default vocabulary set instead of surfacing that the dialect is malformed.
Severity: medium
Other Locations
vendor/blaze/src/foundation/foundation.cc:521
🤖 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: c12664f | Previous: 19f29a9 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
421 ms |
853 ms |
0.49 |
Add one schema (100 existing) |
28 ms |
28 ms |
1 |
Add one schema (1000 existing) |
83 ms |
88 ms |
0.94 |
Add one schema (10000 existing) |
747 ms |
698 ms |
1.07 |
Update one schema (1 existing) |
23 ms |
22 ms |
1.05 |
Update one schema (101 existing) |
28 ms |
30 ms |
0.93 |
Update one schema (1001 existing) |
83 ms |
89 ms |
0.93 |
Update one schema (10001 existing) |
679 ms |
710 ms |
0.96 |
Cached rebuild (1 existing) |
6 ms |
6 ms |
1 |
Cached rebuild (101 existing) |
8 ms |
8 ms |
1 |
Cached rebuild (1001 existing) |
28 ms |
30 ms |
0.93 |
Cached rebuild (10001 existing) |
240 ms |
254 ms |
0.94 |
Index 100 schemas |
634 ms |
643 ms |
0.99 |
Index 1000 schemas |
1606 ms |
1649 ms |
0.97 |
Index 10000 schemas |
13988 ms |
14478 ms |
0.97 |
Index 10000 schemas (custom meta-schema) |
143974 ms |
149691 ms |
0.96 |
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: c12664f | Previous: 19f29a9 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
321 ms |
392 ms |
0.82 |
Add one schema (100 existing) |
25 ms |
32 ms |
0.78 |
Add one schema (1000 existing) |
70 ms |
89 ms |
0.79 |
Add one schema (10000 existing) |
591 ms |
952 ms |
0.62 |
Update one schema (1 existing) |
18 ms |
26 ms |
0.69 |
Update one schema (101 existing) |
26 ms |
30 ms |
0.87 |
Update one schema (1001 existing) |
71 ms |
86 ms |
0.83 |
Update one schema (10001 existing) |
595 ms |
683 ms |
0.87 |
Cached rebuild (1 existing) |
5 ms |
8 ms |
0.63 |
Cached rebuild (101 existing) |
6 ms |
9 ms |
0.67 |
Cached rebuild (1001 existing) |
19 ms |
30 ms |
0.63 |
Cached rebuild (10001 existing) |
162 ms |
248 ms |
0.65 |
Index 100 schemas |
594 ms |
626 ms |
0.95 |
Index 1000 schemas |
1291 ms |
1586 ms |
0.81 |
Index 10000 schemas |
11199 ms |
14220 ms |
0.79 |
Index 10000 schemas (custom meta-schema) |
137589 ms |
139769 ms |
0.98 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com