Issue Task Resolved

#110517Use indexed hashes for FAL identifier lookups

Wouter Wolters 08/21/26, 21:16 updated 09/20/26, 13:31

Description

FileIndexRepository currently looks up UID-less files in sys_file using (storage, identifier). This combination is not indexed, while the schema already provides an index for
(storage, identifier_hash).

Use the storage’s existing hashFileIdentifier() method and query by identifier_hash in hasIndexRecord() and the UID-less update fallback.

Benefits:

- Uses an existing database index
- Avoids full table scans as sys_file grows
- Requires no schema migration or additional index
- Improves a synthetic 100,000-row lookup from approximately 2.227 ms to 0.002 ms (~967× faster)

Add a functional test confirming that UID-less file lookups use the identifier hash.

Reviews 2

History 24

  1. Gerrit Code Review pushed patch set 1 for main to change 95382 status New Under Review 08/21/26, 21:17

  2. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % 08/31/26, 20:40

    Applied in changeset commit:5e507873ef08ca62eb1eb356f86c94bd9a1f147c.

  3. Gerrit Code Review pushed patch set 1 for 14.3 to change 95514 status Resolved Under Review 09/01/26, 09:49

  4. Wouter Wolters changed status Under Review Resolved 09/20/26, 13:31