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

MongoDB Audit backend fails to persist docPath longer than 1024 characters

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.10, 2021.0
    • Fix Version/s: HOTFIX_10.10, 2021.x
    • Component/s: Audit

      Description

      Index key in MongoDB are limited to 1024 character, logentry docPath is indexed and could be longer,
      this creates a systematic failure on the AuditLogWriter:

      Terminate computation: AuditLogWriter due to previous failure
      
      Computation: AuditLogWriter fails to process batch of 6 records after retries, last record: audit-00:+4564507, policy: ComputationPolicy{maxRetries=35, delay=1000 milliseconds, delayMax=60000 milliseconds, continueOnFailure=false, batchCapacity=25, batchThreshold=PT0.5S}
      
      com.mongodb.MongoBulkWriteException: Bulk write operation error on server xxxx.mongodb.net:27017. Write errors: [BulkWriteError{index=1, code=17280, message='WiredTigerIndex::insert: key too large to index, failing  1053 { : "/xxx/yyyyyy/zzzz/ very long path ..." }', details={}}].
      	at com.mongodb.connection.BulkWriteBatchCombiner.getError(BulkWriteBatchCombiner.java:173) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.connection.BulkWriteBatchCombiner.throwOnError(BulkWriteBatchCombiner.java:202) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.connection.BulkWriteBatchCombiner.getResult(BulkWriteBatchCombiner.java:143) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.BulkWriteBatch.getResult(BulkWriteBatch.java:227) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation.executeBulkWriteBatch(MixedBulkWriteOperation.java:282) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation.access$700(MixedBulkWriteOperation.java:72) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:205) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:196) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.OperationHelper.withReleasableConnection(OperationHelper.java:501) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:196) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:71) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:213) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.client.internal.MongoCollectionImpl.executeInsertMany(MongoCollectionImpl.java:529) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.client.internal.MongoCollectionImpl.insertMany(MongoCollectionImpl.java:513) ~[mongo-java-driver-3.12.1.jar:?]
      	at com.mongodb.client.internal.MongoCollectionImpl.insertMany(MongoCollectionImpl.java:508) ~[mongo-java-driver-3.12.1.jar:?]
      	at org.nuxeo.mongodb.audit.MongoDBAuditBackend.addLogEntries(MongoDBAuditBackend.java:356) ~[nuxeo-platform-audit-mongodb-10.10-HF49.jar:?]
      	at org.nuxeo.ecm.platform.audit.impl.StreamAuditWriter$AuditLogWriterComputation.writeEntriesToAudit(StreamAuditWriter.java:96) ~[nuxeo-platform-audit-core-10.10-HF50.jar:?]
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bdelbosc Benoit Delbosc
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: