n8n/packages/@n8n
Garrit Franke d24fa54996
perf(editor): harden node search data layer with index, EXISTS sharing and keyset scan
Ports the measured DB-layer hardening from #30294 onto the node content
search, and closes two correctness gaps:

1. Sharing as EXISTS, not `workflow.id IN (subquery)`. The IN form makes
   SQLite drive from shared_workflow and sort every LIKE match in a temp
   B-tree, discarding the updatedAt index (measured on a 20k corpus in
   #30294; plan-asserted there in node-search-variants.perf.ts).

2. Index on workflow_entity.updatedAt (migration
   AddUpdatedAtIndexToWorkflowEntity1786525332822 + entity mirror). The
   query orders by updatedAt and stops at the limit; without the index
   every keystroke sorts the whole table (149ms -> 0.9ms at 20k). The
   migration was already registered in the generated migration index on
   this branch but the file itself was never committed.

3. Keyset scan instead of a fixed 500-candidate cap. The SQL pre-filter
   matches the raw JSON blob - node ids, webhook ids, positions - which
   the in-memory matcher deliberately skips, so a fixed cap let blob-only
   false positives displace real hits and silently return nothing. The
   service now batches 100 candidates on an (updatedAt, id) cursor (id
   tiebreak: updatedAt is not unique) until the result list fills,
   candidates run out, or a 2000-workflow safety rail stops pathological
   queries. The cursor is a row-value comparison, NOT the equivalent
   'a < x OR (a = x AND b < y)': the OR form makes SQLite pick a
   MULTI-INDEX OR plan that re-materialises per batch (measured 3.5s vs
   96ms per search at 20k in #30294).

   Credential names are matched too (new 'credentials' field, ranked
   last): they appear in the serialized workflow, so the pre-filter
   matches them, and without an in-memory counterpart a credential-name
   query only ever produced false positives - the most realistic trigger
   for the empty-results bug.

Also ports the Postgres planner hint (SET LOCAL enable_seqscan = off)
from #30294: Postgres cannot estimate '%...%' selectivity and otherwise
seq-scans + top-N sorts instead of walking the index (75ms -> 1ms).

Deliberately not ported from #30294 (yet): the pLimit(1) concurrency
gate + per-user rate limiter, and the performance benchmark suite.

Verified: matcher 40/40, service unit 19/19, integration 22/22 on both
SQLite and Postgres 16; typecheck and lint clean across db, cli,
workflow, api-types and editor-ui; editor-ui composable tests 24/24.
2026-08-12 16:24:01 +02:00
..
agents fix(core): Fail stalled Instance AI model streams fast instead of hanging (#35943) 2026-08-10 15:45:15 +00:00
ai-node-sdk docs(core): Remove outdated AI node verification note from ai-node-sdk README (#35619) 2026-08-06 08:14:43 +00:00
ai-utilities fix(core): Show custom OpenAI-compatible models in Agents (no-changelog) (#35781) 2026-08-10 12:31:07 +00:00
ai-workflow-builder.ee 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
api-types perf(editor): harden node search data layer with index, EXISTS sharing and keyset scan 2026-08-12 16:24:01 +02:00
backend-common feat(core): Enable 'instance-ai' module by default and remove startup warning (#35670) 2026-08-10 07:14:01 +00:00
backend-network chore: Bundle/2.x (#35563) 2026-08-05 08:29:40 +03:00
backend-test-utils fix(core): Handle errors from triggered and polled workflow executions (#35689) 2026-08-06 13:07:01 +00:00
benchmark chore: Align dev environments to Postgres 18 (no-changelog) (#35938) 2026-08-10 13:32:02 +00:00
blob-storage fix(core): Probe azure blob with list instead of exists() (#35719) 2026-08-06 12:01:11 +00:00
chat-hub 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
cli feat(core): Add projectConflictPolicy to package import (#35488) 2026-08-05 15:37:11 +00:00
client-oauth2 fix(core): Deduplicate OAuth2 authorization URL query parameters (#35949) 2026-08-10 15:08:26 +00:00
codemirror-lang 🚀 Release 2.31.0 (#34117) 2026-07-14 07:18:45 +00:00
codemirror-lang-html 🚀 Release 2.31.0 (#34117) 2026-07-14 07:18:45 +00:00
codemirror-lang-sql 🚀 Release 2.31.0 (#34117) 2026-07-14 07:18:45 +00:00
computer-use chore: Bump @anthropic-ai/sandbox-runtime 0.0.61 → 0.0.66 (patch) to clear 1 Aikido finding (#35601) 2026-08-05 11:50:30 +00:00
config feat(core): Make the vm expression engine the default (#35738) 2026-08-07 09:55:26 +00:00
constants refactor(core): Remove accidental cross-module imports (#35907) 2026-08-10 14:16:31 +00:00
crdt 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
create-node 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
db perf(editor): harden node search data layer with index, EXISTS sharing and keyset scan 2026-08-12 16:24:01 +02:00
decorators feat(API): Add @Deprecated decorator to the decorated controller platform (#35725) 2026-08-07 10:06:14 +00:00
di 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
engine feat(core): Shape step IO as slot-indexed lists in @n8n/engine (no-changelog) (#35672) 2026-08-07 08:35:42 +00:00
errors 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
eslint-config chore: Bundle/2.x (#35563) 2026-08-05 08:29:40 +03:00
eslint-plugin-community-nodes chore(core): Exempt trigger nodes from usableAsTool lint requirement (no-changelog) (#35769) 2026-08-10 07:23:36 +00:00
expression-runtime feat(core): Make the vm expression engine the default (#35738) 2026-08-07 09:55:26 +00:00
extension-sdk 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
imap 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
instance-ai test(core): Support credential seeding in MCP workflow evals (no-changelog) (#35782) 2026-08-10 19:56:03 +00:00
json-schema-to-zod 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
local-gateway chore: More Typescript 7 migrations (#34228) 2026-07-16 07:44:11 +00:00
mcp-apps feat(core): Migrate the instance MCP server to the MCP TypeScript SDK v2 (#35467) 2026-08-07 01:16:47 +00:00
mcp-browser 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
mcp-browser-extension fix: Stop browser_clicks timing out in background browser tabs (no-changelog) (#35968) 2026-08-10 15:33:37 +00:00
node-cli 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
node-engine-compatibility feat(core): Shape step IO as slot-indexed lists in @n8n/engine (no-changelog) (#35672) 2026-08-07 08:35:42 +00:00
nodes-langchain chore: Bump mysql2 3.17.0 → 3.23.1 (minor) to clear 4 Aikido findings (#35761) 2026-08-07 08:43:49 +00:00
permissions feat(API): Add endpoint to create custom roles (#35522) 2026-08-07 14:43:36 +00:00
scan-community-package 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
scheduler 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
stylelint-config chore: Migrate the rest of packages/@n8n to typescript 7 (#34332) 2026-07-17 10:45:58 +03:00
syslog-client 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
task-runner refactor: Assign task runner IDs from n8n (#35494) 2026-08-10 11:20:37 +00:00
task-runner-python refactor: Assign task runner IDs from n8n (#35494) 2026-08-10 11:20:37 +00:00
telemetry feat(core): Add telemetry for Simplified Custom Auth templated credentials (#35832) 2026-08-07 12:50:51 +00:00
tournament 🚀 Release 2.33.0 (#35054) 2026-07-28 07:15:34 +00:00
typeorm 🚀 Release 2.33.0 (#35054) 2026-07-28 07:15:34 +00:00
typescript-config 🚀 Release 2.31.0 (#34117) 2026-07-14 07:18:45 +00:00
utils 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
vitest-config test(editor): Move reusable frontend test setup into @n8n/vitest-config (no-changelog) (#35637) 2026-08-07 10:14:37 +00:00
workflow-sdk fix(Execute Workflow Node): Prevent invalid input mappings (#35767) 2026-08-10 08:56:39 +00:00