You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by GitBox <gi...@apache.org> on 2022/02/09 08:48:57 UTC

[GitHub] [sling-org-apache-sling-distribution-journal] joerghoh commented on a change in pull request #97: SLING-10583 - Ensure o/a/s/d/a/p/distributed events are raised at least once

joerghoh commented on a change in pull request #97:
URL: https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/97#discussion_r802403109



##########
File path: src/main/java/org/apache/sling/distribution/journal/impl/publisher/PackageDistributedNotifier.java
##########
@@ -130,6 +150,9 @@ private void sendEvt(String pubAgentName, DistributionQueueItem queueItem) {
         try {
             Event distributed = DistributionEvent.eventPackageDistributed(queueItem, pubAgentName);
             eventAdmin.sendEvent(distributed);
+            LocalStore localStore = map.get(pubAgentName);
+            localStore.store(STORE_TYPE_OFFSETS, queueItem.get(QueueItemFactory.RECORD_OFFSET));

Review comment:
       Please consider that this is always open a new ResourceResolver, which can be quite an overhead; especially when you do that multiple times a second.
   
   I would not change the implementation approach already, but keep an eye on it.




-- 
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: commits-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org