Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Gettig OakState0001: Unresolved conflicts error on asset import

asn_india
Level 2
Level 2

Hi All,

We have a scheduled task that triggers a workflow which brings/imports assets from a ftp server/site. these assets are of type .psd (with average file size 35-40 MB).

We are observing lot of errors of type OakState0001 in log files, the asset count is fine...I mean all the assets are getting downloaded from ftp site and uploaded into AEM.

But there are quite a few errors in logs....and this causes lot of workflow failures in workflow console.

Apparently, there is some conflict arising with (DAM-Update-asset) workflow and workflow process that brings these assets from FTP site.

We enabled ConflictValidator logs and could see something like below --

org.apache.jackrabbit.oak.plugins.commit.ConflictValidator Commit failed due to unresolved conflicts in /content/dam/projects/company/january/012120_set_e/retouched/21PSDW_INSERT.jpg/jcr:content = {addExistingProperty = {jcr:lastModifiedBy = {workflow-p...,customer-asset-...}}}

 

org.apache.jackrabbit.oak.plugins.commit.ConflictValidator Commit failed due to unresolved conflicts in /content/dam/projects/company/january/012120_set_e/retouched/08IRENNA_1.psd/jcr:content/renditions/cq5dam.thumbnail.48.48.png/jcr:content = {addExistingProperty = {jcr:data = {<BINARY>,<BINARY>}}}

out of which "customer-asset-..." is our system user that is used to acquire resource resolver in workflow process that downloads and creates these assets in dam.

 

The code for workflow that imports assets gets resource resolver in below manner --

 

Map<String,Object> paramMap = new HashMap<>();
paramMap.put(ResourceResolverFactory.SUBSERVICE,"dam-asset-move");
try {
resourceResolver = resourceResolverFactory.getServiceResourceResolver(paramMap);

//

some code to connect to ftp site and loop for every asset

//

assetManager.createAsset(assetName,inputStream,mimeType,true);

 

The whole process of downloading assets from ftp site takes close to 2 hours ....since there are ~600 assets every day.

 

@Jörg_Hoh  any insights from you to investigate this further would help a lot!

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Hi,

This exception typically means that 2 sessions are working concurrently on the same node. Because of the MVCC pattern they don't get the updates the other session is performing on the node, and thus it fails on commit. One seems to be your process, while the other one being the AssetUpdate workflow.

 

AssetManager.createAsset(String path, InputStream is,String mimetype, boolean doSave)

 

seems to be the right now thing; even with "doSave = true" it will create the asset within a single commit. Also this commit seems to happen correctly, otherwise the workflow wouldn't start (there wouldn't be any asset to start on). So there must a 3rd session around, which tries to modify content. Can you paste the *full log messages* with these errors? Especially the name of the logger and the threadname is of interest.

 

(Technically it would be possible, that the asset you want to create is already there and that a workflow is currently running on it, while you do the call above. Can you rule that out?)

View solution in original post

5 Replies
Jörg_Hoh
Correct answer by
Employee
Employee

Hi,

This exception typically means that 2 sessions are working concurrently on the same node. Because of the MVCC pattern they don't get the updates the other session is performing on the node, and thus it fails on commit. One seems to be your process, while the other one being the AssetUpdate workflow.

 

AssetManager.createAsset(String path, InputStream is,String mimetype, boolean doSave)

 

seems to be the right now thing; even with "doSave = true" it will create the asset within a single commit. Also this commit seems to happen correctly, otherwise the workflow wouldn't start (there wouldn't be any asset to start on). So there must a 3rd session around, which tries to modify content. Can you paste the *full log messages* with these errors? Especially the name of the logger and the threadname is of interest.

 

(Technically it would be possible, that the asset you want to create is already there and that a workflow is currently running on it, while you do the call above. Can you rule that out?)

View solution in original post

asn_india
Level 2
Level 2

Hi @Jörg_Hoh,

 

Thanks for response.

I do not think that its possible that the asset existed in this folder before this workflow is creating the asset with AssetManager.createAsset method....so its fair to say we can rule that possibility.

 

I am pasting below a section of logs if it helps more - pls note that we had enabled ConflictValidator at DEBUG level for few hours and took this log out.

We are yet to try enabling JCR write logs in prod (We dont have access and ask AMS to do so, but can very well be done)- Do you think doing that would help zero in on something?

 

Logs below and again thanks in advance --

 

22.01.2021 06:30:26.683 *DEBUG* [JobHandler: /var/workflow/instances/server0/2021-01-22/update_asset_398:/content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/renditions/original] org.apache.jackrabbit.oak.plugins.commit.ConflictValidator Commit failed due to unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/renditions/cq5dam.thumbnail.48.48.png/jcr:content = {addExistingProperty = {jcr:data = {<BINARY>,<BINARY>}}}
org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/renditions/cq5dam.thumbnail.48.48.png/jcr:content
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:115) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:84) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyAdded(CompositeEditor.java:82) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyAdded(EditorDiff.java:81) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareProperties(SegmentNodeState.java:626) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:489) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:495) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:495) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.Commit.apply(Commit.java:105) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.execute(LockBasedScheduler.java:322) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.schedule(LockBasedScheduler.java:292) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:193) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:250) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:346) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:493) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:420) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:273) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:417) [org.apache.jackrabbit.oak-jcr:1.8.17]
at com.day.cq.dam.core.impl.RenditionMakerImpl.generateRenditions(RenditionMakerImpl.java:224) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.day.cq.dam.core.process.CreateThumbnailProcess.createThumbnails(CreateThumbnailProcess.java:121) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.day.cq.dam.core.process.ThumbnailProcess.execute(ThumbnailProcess.java:102) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.adobe.cq.dam.dm.process.workflow.DMImageProcess.createThumbnails(DMImageProcess.java:328) [com.adobe.cq.dam.cq-scene7-imaging:1.5.30]
at com.adobe.cq.dam.dm.process.workflow.DMImageProcess.execute(DMImageProcess.java:137) [com.adobe.cq.dam.cq-scene7-imaging:1.5.30]
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93) [com.day.cq.workflow.cq-workflow-impl:6.2.14]
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:194) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:261) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
22.01.2021 06:30:26.871 *DEBUG* [JobHandler: /var/workflow/instances/server0/2021-01-22/update_asset_398:/content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/renditions/original] org.apache.jackrabbit.oak.plugins.commit.ConflictValidator Commit failed due to unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content = {addExistingProperty = {jcr:lastModifiedBy = {workflow-p...,company-asset-...}}}
org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:115) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:84) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyAdded(CompositeEditor.java:82) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyAdded(EditorDiff.java:81) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareProperties(SegmentNodeState.java:626) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:489) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.Commit.apply(Commit.java:105) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.execute(LockBasedScheduler.java:322) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.schedule(LockBasedScheduler.java:292) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:193) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:250) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:346) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:493) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:420) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:273) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:417) [org.apache.jackrabbit.oak-jcr:1.8.17]
at com.day.cq.dam.core.impl.RenditionMakerImpl.generateRenditions(RenditionMakerImpl.java:224) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.day.cq.dam.core.process.CreateWebEnabledImageProcess.createWebEnabledImage(CreateWebEnabledImageProcess.java:164) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.day.cq.dam.core.process.ThumbnailProcess.execute(ThumbnailProcess.java:106) [com.day.cq.dam.cq-dam-core:5.11.380]
at com.adobe.cq.dam.dm.process.workflow.DMImageProcess.createThumbnails(DMImageProcess.java:328) [com.adobe.cq.dam.cq-scene7-imaging:1.5.30]
at com.adobe.cq.dam.dm.process.workflow.DMImageProcess.execute(DMImageProcess.java:137) [com.adobe.cq.dam.cq-scene7-imaging:1.5.30]
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93) [com.day.cq.workflow.cq-workflow-impl:6.2.14]
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:194) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:261) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
22.01.2021 06:30:26.875 *DEBUG* [JobHandler: /var/workflow/instances/server0/2021-01-22/update_asset_398:/content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/renditions/original] org.apache.jackrabbit.oak.plugins.commit.ConflictValidator Commit failed due to unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/metadata = {addExistingProperty = {dam:extracted = {2021-01-22T06:30:24.886-08:00,2021-01-22T06:30:24.828-08:00}}}
org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/projects/brand/january/012120_set_e/retouched/08INT1125WRBIRENNA_1.psd/jcr:content/metadata
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:115) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyChanged(ConflictValidator.java:90) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyChanged(CompositeEditor.java:90) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyChanged(EditorDiff.java:92) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareProperties(SegmentNodeState.java:630) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:489) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeChanged(MapRecord.java:449) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:495) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:440) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:422) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.Commit.apply(Commit.java:105) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.execute(LockBasedScheduler.java:322) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.scheduler.LockBasedScheduler.schedule(LockBasedScheduler.java:292) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:193) [org.apache.jackrabbit.oak-segment-tar:1.8.17]
at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:250) [org.apache.jackrabbit.oak-core:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:346) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:493) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:420) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:273) [org.apache.jackrabbit.oak-jcr:1.8.17]
at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:417) [org.apache.jackrabbit.oak-jcr:1.8.17]
at com.adobe.granite.repository.impl.CRX3SessionImpl.save(CRX3SessionImpl.java:208) [com.adobe.granite.repository:1.4.92]
at com.adobe.cq.dam.dm.process.workflow.DMImageProcess.execute(DMImageProcess.java:141) [com.adobe.cq.dam.cq-scene7-imaging:1.5.30]
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93) [com.day.cq.workflow.cq-workflow-impl:6.2.14]
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:194) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:261) [com.adobe.granite.workflow.core:2.0.168.CQ640-B0010]
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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Jörg_Hoh
Employee
Employee
Hi. According to the Javadoc of createAsset it will update an existing asset if an asset exists at that path already. So technically it could be possible that there are conflicting sessions. The exception below indicates that the update-asset workflow was affected by this, meaning that a different thread was updating the asset in the meantime. Do you have a custom workflow which is also configured to run on assets? Do you have ObservationListeners in your code, which operate on Assets as well?
asn_india
Level 2
Level 2

Hi @Jörg_Hoh,

 

Thank you so much for direction - It took me some time to investigate but yeah there were two workflows, one OOTB DAM Update asset and another one which is nothing but copy of DAM update asset extended with some custom steps at the end. Both these workflows were running on that folder.

So I excluded this folder from OOTB DAM Update asset launcher and did not see Oakstate error in latest run.

Thanks a ton again for your help!!

Jörg_Hoh
Employee
Employee
Thanks for reporting back. Good that you made it work!