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

Remove support for updating an existing GridFS file

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.1
    • Component/s: GridFS
    • None

      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.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: