From f4e524f3c3a69119e6b7f41aae25afdea26e6ff4 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 31 Oct 2026 06:45:13 +0000 Subject: [PATCH] place-enrichment: the details lookup is a standalone cache fill The service reads a community place's details before the result cache and every other place's after it, so the lookup has two call sites of which one runs. It only fills the details row cache and turns a failure into no details, so it is tagged @txStandalone and the enrich baseline drops to the four writes it holds without it. --- server/scripts/tx-writes-baseline.json | 2 +- server/src/nest/place-enrichment/place-enrichment.service.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/scripts/tx-writes-baseline.json b/server/scripts/tx-writes-baseline.json index 6a97aa93b..dcb76f5f1 100644 --- a/server/scripts/tx-writes-baseline.json +++ b/server/scripts/tx-writes-baseline.json @@ -57,7 +57,7 @@ "src/nest/notifications/transports/web-push.service.ts#WebPushService.settle": 2, "src/nest/oidc/oidc.controller.ts#OidcController.callback": 2, "src/nest/place-enrichment/place-enrichment.service.ts#PlaceEnrichmentService.collectPhotos": 5, - "src/nest/place-enrichment/place-enrichment.service.ts#PlaceEnrichmentService.enrich": 5, + "src/nest/place-enrichment/place-enrichment.service.ts#PlaceEnrichmentService.enrich": 4, "src/nest/place-enrichment/place-enrichment.service.ts#PlaceEnrichmentService.readCache": 2, "src/nest/place-enrichment/place-enrichment.service.ts#PlaceEnrichmentService.storeCandidate": 2, "src/nest/place-photos/place-photo-cache.job.ts#PlacePhotoCacheJob.onApplicationBootstrap": 2, diff --git a/server/src/nest/place-enrichment/place-enrichment.service.ts b/server/src/nest/place-enrichment/place-enrichment.service.ts index 38a7c541e..6bc9121c2 100644 --- a/server/src/nest/place-enrichment/place-enrichment.service.ts +++ b/server/src/nest/place-enrichment/place-enrichment.service.ts @@ -907,6 +907,9 @@ export class PlaceEnrichmentService { * This is the same lookup the dialog already made when the user picked the * search result, and it is row-cached, so in practice it is a cache read * rather than a second provider call. + * + * @txStandalone the only write is the details row cache filling itself; a + * failure reads as no details and nothing else is written with it. */ private async readDetails( userId: number,