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

Fix NPE raised with ids are null

    XMLWordPrintable

    Details

      Description

      From bench https://qa.nuxeo.org/jenkins/job/Misc/job/nuxeo-reference-bench/777/artifact/logs/172.30.2.8/

      2017-01-13 15:17:52,641 WARN  [Nuxeo-Work-elasticSearchIndexing-5:1105762330440.1063074036] [Transaction] Unexpected exception from afterCompletion; continuing
      java.lang.NullPointerException
      	at java.util.Objects.requireNonNull(Objects.java:203)
      	at java.lang.String.join(String.java:2501)
      	at org.nuxeo.ecm.core.redis.contribs.RedisDBSInvalidations.serializeInvalidations(RedisDBSInvalidations.java:86)
      	at org.nuxeo.ecm.core.redis.contribs.RedisDBSInvalidations.serialize(RedisDBSInvalidations.java:79)
      	at org.nuxeo.ecm.core.redis.contribs.RedisDBSClusterInvalidator.sendInvalidations(RedisDBSClusterInvalidator.java:212)
      	at org.nuxeo.ecm.core.storage.dbs.DBSCachingRepository.sendInvalidationsToOther(DBSCachingRepository.java:284)
      	at org.nuxeo.ecm.core.storage.dbs.DBSCachingRepository.commit(DBSCachingRepository.java:146)
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.commit(DBSTransactionState.java:723)
      	at org.nuxeo.ecm.core.storage.dbs.DBSSession.commit(DBSSession.java:213)
      	at org.nuxeo.ecm.core.storage.dbs.DBSRepositoryBase$TransactionContext.afterCompletion(DBSRepositoryBase.java:418)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:540)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:533)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:329)

      There seem to be no check on invals.ids:

          private String serializeInvalidations(DBSInvalidations invals) {
              if (invals.all) {
                  return ALL_DOCUMENTS;
              }   
              return String.join(ID_SEPARATOR, invals.ids);
          }   
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m