Timothee Maret created SLING-10563:
--------------------------------------
Summary: DistributionPublisher closes the PubQueueProvider service
Key: SLING-10563
URL: https://issues.apache.org/jira/browse/SLING-10563
Project: Sling
Issue Type: Bug
Components: Content Distribution
Reporter: Timothee Maret
Fix For: Content Distribution Journal Core 0.1.18
The PubQueueProvider service is registered via the PubQueueProviderPublisher
component. The DistributionPublisher references the PubQueueProvider service
and close it when deactivating.
So, when the DistributionPublisher is active again, it references a closed
PubQueueProvider service. As the PubQueueProvider is closed, the
PubQueueCache#tailPoller is closed and thus newer package messages are no
longer fetched. As a result, distributing new content throws exceptions like
the following
{code}
[sling-threadpool-950ecf5e-b8e8-4755-9066-918485528372-(apache-sling-job-thread-pool)-5-<main
queue>(file_importer_job)] com.day.cq.replication.impl.ReplicatorImpl Error
during replication with agent=publish
com.day.cq.replication.ReplicationException:
org.apache.sling.distribution.common.DistributionException: Failed to append
distribution package
PackageMessage(pubSlingId=4be0493c-b52c-4558-9b68-813843cc4e18, reqType=ADD,
pkgId=dstrpck-1623937501721-346c09c9-dcbf-44fe-856e-d5f96148b2a4,
pkgType=journal_filevault, pkgLength=9848, pubAgentName=publish,
userId=replication-service,
paths=[/content/dam/enel-common/updated-files/com/enelChile.xml], deepPaths=[])
to the journal
at
com.adobe.granite.distribution.core.impl.replication.DistributionTransportHandler.deliver(DistributionTransportHandler.java:134)
[com.adobe.granite.distribution.core:0.2.56]
at
com.adobe.granite.distribution.core.impl.replication.adapters.ReplicationAgent.replicate(ReplicationAgent.java:116)
[com.adobe.granite.distribution.core:0.2.56]
at
com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:451)
[com.day.cq.cq-replication:6.3.22]
at dh.com.common.core.utils.AssetUtils.writeToDam(AssetUtils.java:170)
[enel-common.core:1.0.2.2021_0616_1125947_0000485816]
at
dh.com.common.core.schedulers.consumer.FileImporterJobConsumer.process(FileImporterJobConsumer.java:57)
[enel-common.core:1.0.2.2021_0616_1125947_0000485816]
at
org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502)
[org.apache.sling.event:4.2.12]
at
org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)
[org.apache.sling.event:4.2.12]
at
org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)
[org.apache.sling.event:4.2.12]
at
org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)
[org.apache.sling.event:4.2.12]
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.sling.distribution.common.DistributionException: Failed
to append distribution package
PackageMessage(pubSlingId=4be0493c-b52c-4558-9b68-813843cc4e18, reqType=ADD,
pkgId=dstrpck-1623937501721-346c09c9-dcbf-44fe-856e-d5f96148b2a4,
pkgType=journal_filevault, pkgLength=9848, pubAgentName=publish,
userId=replication-service,
paths=[/content/dam/enel-common/updated-files/com/enelChile.xml], deepPaths=[])
to the journal
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.execute(DistributionPublisher.java:291)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.execute(DistributionPublisher.java:258)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
at
com.adobe.granite.distribution.core.impl.replication.adapters.ReplicationAgent$1.distribute(ReplicationAgent.java:120)
[com.adobe.granite.distribution.core:0.2.56]
at
com.adobe.granite.distribution.core.impl.replication.DistributionTransportHandler.deliver(DistributionTransportHandler.java:124)
[com.adobe.granite.distribution.core:0.2.56]
... 11 common frames omitted
Caused by: java.lang.RuntimeException: java.util.concurrent.TimeoutException
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.sendAndWait(DistributionPublisher.java:309)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.lambda$execute$2(DistributionPublisher.java:278)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
at
org.apache.sling.distribution.journal.shared.DistributionMetricsService.timed(DistributionMetricsService.java:131)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.execute(DistributionPublisher.java:278)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
... 14 common frames omitted
Caused by: java.util.concurrent.TimeoutException: null
at
java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
at
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
at
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher.sendAndWait(DistributionPublisher.java:306)
[org.apache.sling.distribution.journal:0.1.17.T202103231434-787e79f]
... 17 common frames omitted
{code}
and distribution actions sent by other instances are no longer reflected in the
queue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)