-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 8.10
-
Component/s: Thumbnail Service
When changing a file:content Blob filename in an event handler triggered during the Before Document Modification event, an event infinite loop is triggered.
How to reproduce:
A) In Studio
- Create a document type extending File and customize the creation/view/edit tabs in enabling the choice of file:content
- Create an Event Handler triggered on BeforeDocumentModification andth preceding document type and calling an operation chain
- Define in Studio Registry an operation Document.UpdatePJTitle and call this operation in the triggered automation chain. Do not save in this operation chain.
{ "operations": [ { "id" : "Document.UpdatePJTitle", "label" : "UpdatePJTitle", "category" : "Document", "description" : "Renomme les PJ", "url" : "UpdatePJTitle", "requires" : null, "signature" : [ "document", "document", "documents", "documents" ], "params" : [ ] } ] }
B) operation
- Create using nuxeocli a custom operation Document.UpdatePJTitle (sources and operation attached)
C) In Nuxeo
- Deploy the Studio project
- Deploy your custom operation thanks to the attached bundle NXP25551-core-1.0-SNAPSHOT.jar
- Start Nuxeo
- Create your document type and create a file:content such as a JPEG picture.
==> Observe a 100% CPU utilization
==> Observe in tab Admin > Monitoring > Event bus (activate both the synchronous and asynchonous event follow up) the number of events sky-rocketing
Note: this infinite loop does not result in a StackOverflowError: this is an infinite loop of events...
The net result is in addition that the audit log is rapidly filled up with actions on the document...
Requesting to fix the infinite events loop