Jakarta Batch Job parameter `purgeAllOnStart` will purge all documents instead of just the ones specified in `entityTypes`
Description
Activity
Show:
Fixed
Details
Details
Assignee
Marko Bekhta
Marko BekhtaReporter
Marko Bekhta
Marko BekhtaComponents
Sprint
None
Fix versions
Priority
Created April 8, 2024 at 5:14 PM
Updated May 16, 2024 at 10:10 AM
Resolved April 15, 2024 at 6:41 AM
With
purgeAllOnStart
set totrue
, a scope forObject
is created https://github.com/hibernate/hibernate-search/blob/b14da95643384d9f2443a34f827d70a43007f523/mapper/orm-jakarta-batch/core/src/main/java/org/hibernate/search/jakarta/batch/core/massindexing/step/beforechunk/impl/BeforeChunkBatchlet.java#L66-L67 Instead of the scope being limited to the entities defined in the entityTypes job parameter, more entities are potentially being removed than theentityTypes
required.See also https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#mapper-orm-indexing-jakarta-batch-parameters