bhabegger opened a new pull request, #3085:
URL: https://github.com/apache/jackrabbit-oak/pull/3085

   ## Summary
   
   - Defers `provisionIndex()` from the `ElasticIndexWriter` constructor to the 
first `updateDocument()`, `deleteDocumentTree()`, or `deleteDocument()` call 
when both `FT_OAK-12249` and `FT_OAK-12248` are enabled
   - A reindex that produces zero documents never creates an Elasticsearch 
index or alias, eliminating the empty-index problem described in OAK-12249
   - `ensureProvisioned()` handles the incremental-write-after-empty-reindex 
case: if an alias does not exist when the first document arrives, it creates a 
new backing index with a fresh seed and points the alias at it
   
   ## Dependency on OAK-12248
   
   OAK-12248 (#2950, graceful 404 handling) has merged to trunk. This branch is 
rebased on top of it.
   
   The runtime dependency remains: `isLazyProvisioningActive()` returns `true` 
only when **both** `FT_OAK-12249` and `FT_OAK-12248` are enabled. Enabling 
`FT_OAK-12249` alone falls back to eager provisioning and logs a `WARN`.
   
   ## Tests
   
   Three new unit tests in `ElasticIndexWriterTest`:
   
   - `lazyProvisioning_requiresGraceful404Toggle` — asserts lazy provisioning 
is inactive when OAK-12248 toggle is off
   - `emptyReindex_doesNotCreateEsIndex` — verifies no ES index is created 
during construction when no documents are written
   - `nonEmptyReindex_provisionsOnFirstDocument` — verifies `provisionIndex()` 
is called on the first `updateDocument()` and not before
   
   All 11 tests in `ElasticIndexWriterTest` pass; full `oak-search-elastic` 
suite (514 tests) passes.
   
   ## Note
   
   Supersedes #2955, opened from 
https://github.com/apache/jackrabbit-oak/pull/2955 (bhabegger/jackrabbit-oak), 
moved to this fork to pick up CI.
   
   ## Jira
   
   https://issues.apache.org/jira/browse/OAK-12249
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to