Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-266

Remove support for updating an existing GridFS file

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: Undecided
    • Component/s: GridFS
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • # Replies:
      5
    • Last comment by Customer:
      false

      Description

      No other driver supports updating an existing GridFS file. The reason given is that this is a very dangerous operation, because while the update is in progress the GridFS file is in an intermediate state and if any other process or thread tries to read the GridFS file during that time the results will be unpredictable.

      This involves removing or changing the following methods:

      MongoGridFS class:
      remove AppendText method
      rename Create methods to CreateNew (because Create FileMode is no longer supported)
      rename CreateText methods to CreateTextNew (because Create FileMode is no longer supported)
      Open methods won't support FileModes: Create, OpenOrCreate, Truncate or Append (only Open or CreateNew will be supported)

      MongoGridFSFileInfo class:
      remove AppendText method
      rename Create methods to CreateNew (because Create FileMode is no longer supported)
      rename CreateText methods to CreateTextNew (because Create FileMode is no longer supported)
      Open methods won't support FileModes: Create, OpenOrCreate, Truncate or Append (only Open or CreateNew will be supported)

      This change is scheduled for version 1.3 to provide sufficient time for comments.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Days since reply:
                3 years, 29 weeks, 3 days ago
                Date of 1st Reply: