Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6218

Including id in DocumentStoreException which wrap MongoException

    XMLWordPrintableJSON

Details

    Description

      Currently when any exception occurs at Mongo level it gets wrapped in DocumentStoreException. To help in debugging such issues it would be good to also include the documentId(s) which was being processed in that call as part of exception message

      Caused by: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: { "serverUsed" : "mongoserver:20001" , "ok" : 1 , "n" : 0 , "updatedExisting" : false , "err" : "Resulting document after update is larger than 16777216" , "code" : 17419}
      	at org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:48)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:41)
      	at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.findAndModify(MongoDocumentStore.java:789)
      	at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.createOrUpdate(MongoDocumentStore.java:805)
      	at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.createOrUpdate(MongoDocumentStore.java:884)
      	at org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.createOrUpdate(LeaseCheckDocumentStoreWrapper.java:133)
      	at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:308)
      	at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:245)
      	at org.apache.jackrabbit.oak.plugins.document.Commit.applyInternal(Commit.java:214)
      	at org.apache.jackrabbit.oak.plugins.document.Commit.apply(Commit.java:203)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:292)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:262)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$300(DocumentNodeStoreBranch.java:57)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:499)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:182)
      	... 36 common frames omitted
      Caused by: com.mongodb.WriteConcernException: { "serverUsed" : "mongoserver:20001" , "ok" : 1 , "n" : 0 , "updatedExisting" : false , "err" : "Resulting document after update is larger than 16777216" , "code" : 17419}
      	at com.mongodb.CommandResult.getWriteException(CommandResult.java:90)
      	at com.mongodb.CommandResult.getException(CommandResult.java:79)
      	at com.mongodb.DBCollectionImpl.translateBulkWriteException(DBCollectionImpl.java:414)
      	at com.mongodb.DBCollectionImpl.updateImpl(DBCollectionImpl.java:292)
      	at com.mongodb.DBCollection.update(DBCollection.java:250)
      	at com.mongodb.DBCollection.update(DBCollection.java:232)
      	at com.mongodb.DBCollection.update(DBCollection.java:307)
      	at com.mongodb.DBCollection.update(DBCollection.java:322)
      	at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.findAndModify(MongoDocumentStore.java:746)
      	... 48 common frames omitted
      

      Attachments

        Activity

          People

            mreutegg Marcel Reutegger
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: