Skip to content

BE-491: Make shortnames case-insensitive#8598

Merged
TimDiekmann merged 11 commits intomainfrom
claude/slack-session-3dmoe
Apr 1, 2026
Merged

BE-491: Make shortnames case-insensitive#8598
TimDiekmann merged 11 commits intomainfrom
claude/slack-session-3dmoe

Conversation

@TimDiekmann
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Shortnames are used in URLs and should be case-insensitive. Previously, @Timd and @timd could be two different users, and restricted names like admin could be bypassed with Admin.

https://claude.ai/code/session_01JQNdEYEowZ22Vj3bTjSVGD

🔍 What does this change?

  • Adds database migration V49 to create a case-insensitive unique index on shortnames using LOWER()
  • Normalizes shortnames to lowercase when storing in the web table
  • Normalizes shortnames to lowercase when looking up by shortname
  • Makes restricted shortname check case-insensitive
  • Makes shortname uniqueness check case-insensitive
  • Normalizes shortnames during user and org creation
  • Handles case-insensitive comparison in user update hooks

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Apr 1, 2026 0:51am
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Apr 1, 2026 0:51am
hashdotdesign-tokens Ignored Ignored Preview Apr 1, 2026 0:51am
petrinaut Skipped Skipped Apr 1, 2026 0:51am

@github-actions github-actions bot added area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/apps labels Mar 31, 2026
fn create_web(&mut self, shortname: Option<String>) -> Result<WebId, Report<WebCreationError>> {
let web_id = WebId::new(Uuid::new_v4());
// Normalize shortname to lowercase for case-insensitive uniqueness
let normalized_shortname = shortname.map(|s| s.to_lowercase());

Check warning

Code scanning / clippy

this ident consists of a single char

this ident consists of a single char
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.50%. Comparing base (0c2347e) to head (9970da2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...cal/graph/postgres-store/src/store/postgres/mod.rs 0.00% 5 Missing ⚠️
...y-hooks/user-before-update-entity-hook-callback.ts 0.00% 2 Missing ⚠️
...src/graph/knowledge/system-types/account.fields.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8598      +/-   ##
==========================================
- Coverage   62.50%   62.50%   -0.01%     
==========================================
  Files        1318     1318              
  Lines      134222   134224       +2     
  Branches     5517     5518       +1     
==========================================
  Hits        83895    83895              
- Misses      49412    49414       +2     
  Partials      915      915              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <0.00%> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

claude and others added 7 commits April 1, 2026 13:41
Shortnames are used in URLs and should be case-insensitive. Previously,
`@Timd` and `@timd` could be two different users, and restricted names
like `admin` could be bypassed with `Admin`.

This fix:
- Adds database migration V49 to create a case-insensitive unique index
  on shortnames using LOWER()
- Normalizes shortnames to lowercase when storing in the web table
- Normalizes shortnames to lowercase when looking up by shortname
- Makes restricted shortname check case-insensitive
- Makes shortname uniqueness check case-insensitive
- Normalizes shortnames during user and org creation
- Handles case-insensitive comparison in user update hooks

https://claude.ai/code/session_01JQNdEYEowZ22Vj3bTjSVGD
- Move normalization to the database layer: add a trigger on the web
  table that lowercases shortnames on INSERT/UPDATE, and migrate
  existing data to lowercase
- Remove redundant normalization from TypeScript callers (user.ts,
  org.ts, hook callback) – the graph handles it
- Keep query-side normalization in Rust (get_web_by_shortname) since
  stored values are lowercase
- Make shortnameIsRestricted handle case internally
- Use case-insensitive comparison in the user update hook
- Add integration tests verifying case-insensitive lookup and
  uniqueness for both users and orgs

https://claude.ai/code/session_01JQNdEYEowZ22Vj3bTjSVGD
- Update graph-migrations v002__principals with case-insensitive
  shortname index and normalization trigger
- Keep postgres_migrations V49 for existing databases with V43 applied

https://claude.ai/code/session_01JQNdEYEowZ22Vj3bTjSVGD
…_shortname

- Normalize shortname in createUser entity property (was missing, unlike createOrg)
- Add TRIM() to DB trigger and migration for defense-in-depth
- Read shortname from DB in get_web_by_shortname instead of echoing input
- Add TRIM($1) to Rust shortname lookup query
- Add whitespace trimming tests for user and org lookups
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 1, 2026

PR Summary

Medium Risk
Changes shortname normalization and lookup semantics across API, SDK, and Postgres, plus a migration that mutates stored data and adds triggers; mistakes could cause unexpected collisions or lookup failures for existing accounts.

Overview
Shortnames are now treated as case-insensitive (and whitespace-insensitive) across the stack. User/org creation and lookup normalize shortnames via trim().toLowerCase(), restricted-name checks are now case-insensitive, and the user update hook only forbids semantic shortname changes (case-only changes no longer error).

On the persistence side, Postgres web.shortname is normalized via a trigger on insert/update, existing rows are backfilled to lowercase/trimmed (V49__case_insensitive_shortname.sql), and get_web_by_shortname queries normalize the input. Integration tests add coverage for mixed-case/whitespace lookups and for preventing duplicates that differ only by case.

Written by Cursor Bugbot for commit 9970da2. This will update automatically on new commits. Configure here.

CiaranMn
CiaranMn previously approved these changes Apr 1, 2026
@TimDiekmann TimDiekmann enabled auto-merge April 1, 2026 12:27
@TimDiekmann TimDiekmann added this pull request to the merge queue Apr 1, 2026
@graphite-app graphite-app bot requested review from a team April 1, 2026 12:27
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Apr 1, 2026

🤖 Augment PR Summary

Summary: Makes user/org shortnames effectively case-insensitive so URLs and restricted names can’t be bypassed via casing.

Changes:

  • Normalize shortnames to lowercase+trim on user/org creation and in the TS SDK’s user shortname patch path.
  • Lowercase/trim shortname inputs for user/org lookups and compare shortnames case-insensitively in update hooks.
  • Add a Postgres migration/trigger to normalize web.shortname on write and backfill existing rows; update the store query accordingly.
  • Add backend integration tests for mixed-case and whitespace shortname lookups and case-only uniqueness conflicts.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@TimDiekmann TimDiekmann removed this pull request from the merge queue due to a manual request Apr 1, 2026
@TimDiekmann TimDiekmann added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 8fe5479 Apr 1, 2026
83 checks passed
@TimDiekmann TimDiekmann deleted the claude/slack-session-3dmoe branch April 1, 2026 13:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$27.9 \mathrm{ms} \pm 140 \mathrm{μs}\left({\color{gray}-0.954 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.40 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}-1.296 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.9 \mathrm{ms} \pm 110 \mathrm{μs}\left({\color{gray}-2.816 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.0 \mathrm{ms} \pm 322 \mathrm{μs}\left({\color{gray}-0.747 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.1 \mathrm{ms} \pm 100 \mathrm{μs}\left({\color{gray}-3.973 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.5 \mathrm{ms} \pm 174 \mathrm{μs}\left({\color{gray}0.321 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.6 \mathrm{ms} \pm 162 \mathrm{μs}\left({\color{gray}-1.854 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.73 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}-0.522 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.2 \mathrm{ms} \pm 99.8 \mathrm{μs}\left({\color{gray}-1.178 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.82 \mathrm{ms} \pm 25.3 \mathrm{μs}\left({\color{gray}0.213 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.99 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}-0.060 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.36 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}-0.386 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.21 \mathrm{ms} \pm 27.6 \mathrm{μs}\left({\color{gray}-1.194 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.59 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}0.456 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.20 \mathrm{ms} \pm 31.2 \mathrm{μs}\left({\color{gray}0.790 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.50 \mathrm{ms} \pm 26.5 \mathrm{μs}\left({\color{gray}-1.253 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.41 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}-1.286 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.17 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}-0.372 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.74 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}-2.877 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-1.909 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.78 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-4.135 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.07 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-0.520 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.86 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{gray}-3.127 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.15 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}-2.283 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.11 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-0.734 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.80 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-1.171 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.97 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-1.470 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.54 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-1.876 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}-1.554 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.29 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}-2.810 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.49 \mathrm{ms} \pm 20.7 \mathrm{μs}\left({\color{gray}-0.211 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}-0.319 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.39 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}0.020 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$45.2 \mathrm{ms} \pm 260 \mathrm{μs}\left({\color{gray}-1.902 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$83.0 \mathrm{ms} \pm 527 \mathrm{μs}\left({\color{gray}-1.999 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$50.5 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}-0.345 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$51.7 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}-2.622 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$63.1 \mathrm{ms} \pm 399 \mathrm{μs}\left({\color{gray}0.427 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$46.6 \mathrm{ms} \pm 210 \mathrm{μs}\left({\color{gray}-2.992 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$425 \mathrm{ms} \pm 974 \mathrm{μs}\left({\color{gray}-0.518 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$101 \mathrm{ms} \pm 504 \mathrm{μs}\left({\color{gray}-2.570 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$93.1 \mathrm{ms} \pm 383 \mathrm{μs}\left({\color{gray}-0.956 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$292 \mathrm{ms} \pm 836 \mathrm{μs}\left({\color{gray}-1.864 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.9 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}1.22 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$19.9 \mathrm{ms} \pm 124 \mathrm{μs}\left({\color{gray}-4.036 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.6 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}-1.017 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$20.4 \mathrm{ms} \pm 139 \mathrm{μs}\left({\color{gray}-1.563 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.5 \mathrm{ms} \pm 178 \mathrm{μs}\left({\color{gray}-2.981 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.4 \mathrm{ms} \pm 111 \mathrm{μs}\left({\color{gray}-1.599 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.4 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{gray}-1.991 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.5 \mathrm{ms} \pm 129 \mathrm{μs}\left({\color{gray}-2.310 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$19.9 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-1.252 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$27.6 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}1.95 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$36.0 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$34.4 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}-2.137 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$34.7 \mathrm{ms} \pm 319 \mathrm{μs}\left({\color{gray}-1.666 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.4 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}-2.497 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$35.3 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{gray}1.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.4 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}-1.866 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$35.7 \mathrm{ms} \pm 318 \mathrm{μs}\left({\color{gray}-1.889 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$34.6 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{gray}2.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$34.9 \mathrm{ms} \pm 309 \mathrm{μs}\left({\color{gray}-1.089 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.53 \mathrm{ms} \pm 71.2 \mathrm{μs}\left({\color{gray}-0.906 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$93.3 \mathrm{ms} \pm 547 \mathrm{μs}\left({\color{gray}-0.259 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$147 \mathrm{ms} \pm 710 \mathrm{μs}\left({\color{gray}-0.589 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$101 \mathrm{ms} \pm 604 \mathrm{μs}\left({\color{gray}1.03 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$109 \mathrm{ms} \pm 686 \mathrm{μs}\left({\color{gray}0.007 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$118 \mathrm{ms} \pm 633 \mathrm{μs}\left({\color{gray}-0.547 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$125 \mathrm{ms} \pm 624 \mathrm{μs}\left({\color{gray}-2.955 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$102 \mathrm{ms} \pm 520 \mathrm{μs}\left({\color{gray}-0.018 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$131 \mathrm{ms} \pm 546 \mathrm{μs}\left({\color{gray}0.091 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$109 \mathrm{ms} \pm 508 \mathrm{μs}\left({\color{gray}0.461 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$118 \mathrm{ms} \pm 595 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$121 \mathrm{ms} \pm 603 \mathrm{μs}\left({\color{gray}0.888 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$120 \mathrm{ms} \pm 467 \mathrm{μs}\left({\color{gray}0.071 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$139 \mathrm{ms} \pm 530 \mathrm{μs}\left({\color{gray}0.001 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$150 \mathrm{ms} \pm 585 \mathrm{μs}\left({\color{gray}-0.292 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$106 \mathrm{ms} \pm 554 \mathrm{μs}\left({\color{red}53.8 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$567 \mathrm{ms} \pm 2.91 \mathrm{ms}\left({\color{gray}0.374 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/libs Relates to first-party libraries/crates/packages (area) area/tests > integration New or updated integration tests area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

4 participants