Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-320

GridFS doesn't check for correct insertion of file-meta-document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.7
    • Fix Version/s: 1.2.8
    • Component/s: pecl-mongo
    • Environment:
      Nginx 1.1.14
      PHP 5.3.10
      Mongodb 2.0.3
    • # Replies:
      5
    • Last comment by Customer:
      true

      Description

      ================================================================================================
      Problem description:
      ================================================================================================
      New file chunks are being saved into GridFS fs.chunks, even when no new entries are
      saved into fs.files due to unique index on 'filename'.

      System Specs:
      Nginx 1.1.14
      PHP 5.3.10
      Mongodb 2.0.3
      PECL MongoDB database driver 1.2.7

      ================================================================================================
      PHP Script:
      ================================================================================================
      <see attachment>

      ================================================================================================
      First run result:
      ================================================================================================
      ######################################

      1. Saving file to fs.files
        ######################################
        [Saved file] New file id:4f311fcd9821c7ef42002b98

      ######################################

      1. Current documents in fs.files
        ######################################
        [file] [_id:4f311fcd9821c7ef42002b98] [filename:/tmp/GridFS_test.txt] [length:10] [chunkSize:262144]

      ######################################

      1. Current documents in fs.chunks
        ######################################
        [chunk] [_id:4f311fcd9821c7ef42002b99] [n:0] [files_id:4f311fcd9821c7ef42002b98]

      ================================================================================================
      Second run result:
      ================================================================================================
      ######################################

      1. Saving file to fs.files
        ######################################
        [Saved file] New file id:4f3120339821c74658002b91

      ######################################

      1. Current documents in fs.files
        ######################################
        [file] [_id:4f311fcd9821c7ef42002b98] [filename:/tmp/GridFS_test.txt] [length:10] [chunkSize:262144]

      ######################################

      1. Current documents in fs.chunks
        ######################################
        [chunk] [_id:4f311fcd9821c7ef42002b99] [n:0] [files_id:4f311fcd9821c7ef42002b98]
        [chunk] [_id:4f3120339821c74658002b92] [n:0] [files_id:4f3120339821c74658002b91]

      =================================================================================================
      Third run result:
      =================================================================================================
      ######################################

      1. Saving file to fs.files
        ######################################
        [Saved file] New file id:4f3120449821c79856000030

      ######################################

      1. Current documents in fs.files
        ######################################
        [file] [_id:4f311fcd9821c7ef42002b98] [filename:/tmp/GridFS_test.txt] [length:10] [chunkSize:262144]

      ######################################

      1. Current documents in fs.chunks
        ######################################
        [chunk] [_id:4f3120449821c79856000031] [n:0] [files_id:4f3120449821c79856000030]
        [chunk] [_id:4f311fcd9821c7ef42002b99] [n:0] [files_id:4f311fcd9821c7ef42002b98]
        [chunk] [_id:4f3120339821c74658002b92] [n:0] [files_id:4f3120339821c74658002b91]

        Attachments

          Activity

            People

            Assignee:
            derick Derick Rethans
            Reporter:
            alex_yam Alex Yam
            Participants:
            Last commenter:
            Alexander Golin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              8 years, 16 weeks, 2 days ago
              Date of 1st Reply: