-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2023.1, 2021.41
-
Component/s: BlobManager, Core
-
Release Notes Summary:Retained flexible records documents can be turned into enforced records
-
Epic Link:
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform #95
With the new flexible record core API (NXP-31968) we may have the following error when trying to turn a retained flexible record into an enforced record.
rg.nuxeo.ecm.core.api.DocumentSecurityException: Failed to invoke operation: Document.Hold, Failed to invoke operation Document.Hold, Cannot change blob from document 48573875-432e-4561-9db1-8b9ac58e9801, it is under retention / hold at org.nuxeo.ecm.core.blob.DocumentBlobManagerComponent.writeBlob(DocumentBlobManagerComponent.java:253) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument.setValueBlob(BaseDocument.java:706) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument$StateBlobAccessor.setBlob(BaseDocument.java:1081) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.blob.DefaultBlobDispatcher.checkBlob(DefaultBlobDispatcher.java:492) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.blob.DefaultBlobDispatcher.lambda$notifyChanges$7(DefaultBlobDispatcher.java:467) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument$Visit.visitBlobsComplex(BaseDocument.java:1101) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument$Visit.visitBlobsField(BaseDocument.java:1124) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument$Visit.visitBlobsComplex(BaseDocument.java:1106) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.BaseDocument.visitBlobs(BaseDocument.java:1036) ~[nuxeo-core-storage-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.visitBlobs(SQLDocumentLive.java:283) ~[nuxeo-core-storage-sql-2023.1.23.jar:?] at org.nuxeo.ecm.core.blob.DefaultBlobDispatcher.notifyChanges(DefaultBlobDispatcher.java:467) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.blob.DefaultBlobDispatcher.notifyMakeRecord(DefaultBlobDispatcher.java:501) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.blob.DocumentBlobManagerComponent.notifyMakeRecord(DocumentBlobManagerComponent.java:317) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.makeRecord(SQLDocumentLive.java:448) ~[nuxeo-core-storage-sql-2023.1.23.jar:?] at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.makeRecord(SQLDocumentLive.java:411) ~[nuxeo-core-storage-sql-2023.1.23.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.makeRecord(AbstractSession.java:2248) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.makeRecord(AbstractSession.java:2216) ~[nuxeo-core-2023.1.23.jar:?] at org.nuxeo.retention.operations.HoldDocument.run(HoldDocument.java:47) ~[nuxeo-retention-2023.1-SNAPSHOT.jar:?]
Typical reproduction use case:
- Create a File document with a main content
- turn in to into a flexible record
- retain the document
- try to apply a legal hold