cancel
Showing results for 
Search instead for 
Did you mean: 

Job rollbacked

mlagneaux
Champ on-the-rise
Champ on-the-rise
Hello,

I've a problem with one of my Alfresco jobs. The aim of this job is to synchronize Alfresco users and groups from an XML export. This job executes a composite action on the XML file and the composite action is made of the following actions:
- Manage user deletions
- Manage user updates
- Manage user creations
- Manage groups (creation, deletion, manage members)

In my case, the job is rollbacked. But there's no exception thrown during the execution (I tried to surround my code in each action with a try/catch on Exception).
I've set the log level to debug for RetryingTransactionHelper and SpringAwareUserTransaction classes and added debug messages in AbstractScheduledAction  and ActionServiceImpl classes but it didn't help me. My transaction status is set to to STATUS_MARKED_ROLLBACK but I can't figure out why.
In RetryingTransactionHelper, the following test is true :

if (txn.getStatus() == Status.STATUS_MARKED_ROLLBACK)


Do you know how the transaction status can be set to STATUS_MARKED_ROLLBACK?
Are there any other classes to set to debug ?

Morevoer, during the process, I've different warnings related to cache :

2014-12-17 16:07:58,621  WARN  [org.alfresco.userToAuthorityTransactionalCache] [DefaultScheduler_Worker-2] Transactional update cache 'org.alfresco.userToAuthorityTransactionalCache' is full (100).
2014-12-17 16:07:59,648  WARN  [org.alfresco.authenticationTransactionalCache] [DefaultScheduler_Worker-2] Transactional removal cache 'org.alfresco.authenticationTransactionalCache' is full (100).

Since this is only warnings related to cache, I don't think this is important in my case.

Thanks in advance for your help.
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Something has marked your transaction for a rollback.     Generally that means an exception has been thrown somewhere and been caught and then not propagated.   

That's not a pattern to use with alfresco's optimistic transaction handling.   So there's a bug somewhere.

You may find debug logging on the exception swallowing, but the exception swallowing is itself a bug and shouldn't be there.

mlagneaux
Champ on-the-rise
Champ on-the-rise
I've splitted my job executing 4 actions into 4 jobs executing one action and it worked! As a consequence, I don't think it's related to the code of my actions.
Is there a limit concerning the number of actions that can be done within a transaction ?

mrogers
Star Contributor
Star Contributor
No.     No limit on the number of "actions".      However there will always be a limit on the number of operations that you can do in a single transaction.   That's why batch operations are needed for huge updates.