The GitHub Actions job "Commit Check" on 
jackrabbit-oak.git/OAK-12249-lazy-provisioning has failed.
Run started by GitHub user bhabegger (triggered by bhabegger).

Head commit for run:
2017575990d114434ccf460ec5fc1f21fd8b1a79 / Benjamin Habegger 
<[email protected]>
OAK-12249: unalias stale index when a lazy reindex produces zero documents

A reindex under lazy provisioning that matches zero documents never invoked
the writer supplier, so LazyElasticIndexWriter.close() had no way to flip
or remove an alias. On a never-provisioned index this is correct (nothing to
clean up), but on an already-provisioned, populated index it left the old,
stale backing index fully aliased and queryable indefinitely -- silently
serving pre-reindex content with no signal anything was wrong, since
REINDEX_COMPLETION_TIMESTAMP also isn't written in this path.

Adds ElasticIndexWriter.unaliasIfProvisioned(), called from
LazyElasticIndexWriter.close() whenever the delegate was never created: it
removes the alias and deletes the backing index if one exists, no-op
otherwise. Proven with a new testcontainers-based
LazyProvisioningReindexITTest against a real Elasticsearch cluster,
following TDD (confirmed RED against the prior behavior before this fix).

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/32711327471

With regards,
GitHub Actions via GitBox

Reply via email to