Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2547

Data corrupted when concurrently uploading files to Mongodb binary store, if the number of threads exceeds the pool size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.Final, 4.6.0.Final
    • 4.5.0.Final
    • JCR
    • None
    • Hide

      Start several threads to upload different .jpg files simultaneously. Uploading should be successful, but the pictures are corrupt when they are downloaded from repository (one by one).

      Show
      Start several threads to upload different .jpg files simultaneously. Uploading should be successful, but the pictures are corrupt when they are downloaded from repository (one by one).

      Data corrupted when using JCR setProperty with BinaryValue.

      node.setProperty (Property.JCR_DATA,session.getValueFactory().createBinary(file));
      

      Putting db.requestStart()/db.requestDone() in
      org.modeshape.jcr.value.binary.MongodbBinaryStore.storeValue( InputStream stream,boolean markAsUnused )
      surrounding the writing operation, could avoid the data corruption.

      Please see https://developer.jboss.org/thread/266829

              hchiorean Horia Chiorean (Inactive)
              jessie_jie_xie Jessie Xie (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: