jwadolowski / cookbook-cq

Chef cookbook for Adobe CQ (aka AEM)
Other
20 stars 23 forks source link

Node delete ends with 500 sometimes #37

Open jwadolowski opened 7 years ago

jwadolowski commented 7 years ago

Under certain circumstances JCR node delete attempt can end with 500 error and the following message in error log:

22.12.2016 14:30:40.617 *WARN* [127.0.0.1 [1482413440442] POST /content/xxx/yyy-com/en_gb/home/preview-form HTTP/1.1] org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider Can't get parent for JcrNodeResource, type=cq:Page, superType=null, path=/content/xxx/yyy-com/en_gb/home/preview-form
javax.jcr.InvalidItemStateException: Item is stale /content/xxx/yyy-com/en_gb/home/preview-form

Most likely given path was processed by some other thread at the same time. Should cq_jcr take care of that automatically? If so, is it possible to determine whether JCR path is taken/locked by some other process? What's more - is it possible to lock given path for the sake of processing over Sling API?