[hibernate-issues] [JIRA] (HSEARCH-3902) Expose addOrUpdate/delete/purge on IndexIndexer/PojoIndexer

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Tue Apr 28 03:08:04 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *updated* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 ) / Task ( https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 ) HSEARCH-3902 ( https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 ) Expose addOrUpdate/delete/purge on IndexIndexer/PojoIndexer ( https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 )

Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

This is only about SPIs, no new feature will be directly exposed as a result of this ticket.

First, we need to expose addOrUpdate on the PojoIndexer if we want to implement a mass indexer that works correctly with concurrent updates. We need this in Infinispan in particular.

Second, in Infinispan, indexing operations are always about a single entity/document, and contained types are irrelevant. Also, there is no concept of session, so the session is implemented as a singleton.
Thus indexing in Infinispan does not need the PojoIndexingPlan and its overhead; Infinispan could use the PojoIndexer directly, if only it exposed the missing operations (addOrUpdate/delete/purge).

Ideally, we should also make the PojoIndexer and IndexIndexers thread-safe, so that Infinispan can use them as singletons. This means in particular fixing the lazy initialization we currently have in PojoIndexer. Maybe we should make the PojoIndexer type-scoped and initialize its delegates eagerly? That certainly wouldn't be a problem for the MassIndexer.

Finally, we'd also need to support DocumentCommitStrategy/DocumentRefreshStrategy in PojoIndexer/IndexIndexer operations. It's quite possible that Infinispan will need to force commit for each write in some situations, however bad performance will be. Maybe we'll be able to improve on that by adding DocumentCommitStrategy.WAIT_FOR/DocumentRefreshStrategy.WAIT_FOR, in another PR.

( https://hibernate.atlassian.net/browse/HSEARCH-3902#add-comment?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3902#add-comment?atlOrigin=eyJpIjoiOWY5ZTZkZDNhNGMyNDI4OWFiZmZlMDZjNmY3ZGExMDUiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:29f7b81 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200428/893f4f7e/attachment.html 


More information about the hibernate-issues mailing list