Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17704

UpdateAceStatus worker not serializable, fails in redis cluster mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.4-SNAPSHOT
    • Fix Version/s: 7.4
    • Component/s: Core

      Description

      On master 7.4

      015-08-17 12:55:00,139 WARN  [Nuxeo-Work-updateACEStatus-1] [Transaction] Unexpected exception from afterCompletion; continuing
      java.lang.RuntimeException: java.io.NotSerializableException: com.codahale.metrics.Counter
              at org.nuxeo.ecm.core.redis.contribs.RedisBlockingQueue.putElement(RedisBlockingQueue.java:92)
              at org.nuxeo.ecm.core.work.NuxeoBlockingQueue.put(NuxeoBlockingQueue.java:85)
              at org.nuxeo.ecm.core.work.NuxeoBlockingQueue.offer(NuxeoBlockingQueue.java:68)
              at org.nuxeo.ecm.core.work.NuxeoBlockingQueue.offer(NuxeoBlockingQueue.java:33)
      
      

      This is due to org.nuxeo.ecm.core.security.UpdateACEStatusWork#fireACEStatusUpdatedEvent that pass a session as argument (a session contains document counter)

          protected void fireACEStatusUpdatedEvent(List<DocumentRef> docRefs) {
              EventContext eventContext = new EventContextImpl(session);
              eventContext.setProperty(DOCUMENT_REFS, (Serializable) docRefs);
              eventContext.setProperty(REPOSITORY_NAME, session.getRepositoryName());
              Framework.getService(EventService.class).fireEvent(ACE_STATUS_UPDATED, eventContext);
          }
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: