Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2807

GridFS spec: Add performant "rename all revisions by filename" feature - rename_by_name

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: GridFS
    • Needed
    • Hide

      Summary of necessary driver changes

      • Implementing the new method Bucket.rename_by_name(filename, newFilename) or skip the test source/gridfs/tests/renameByName.yml

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      Show
      Summary of necessary driver changes Implementing the new method  Bucket.rename_by_name(filename, newFilename) or skip the test source/gridfs/tests/renameByName.yml Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/commit/22f068a82e364184554c1162be3e5b651a37dbd9 Context for other referenced/linked tickets DRIVERS-2808
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-5793 Backlog
      CXX-3166 Backlog
      CSHARP-5397 Backlog
      GODRIVER-3415 Backlog
      JAVA-5688 Backlog
      NODE-6511 Backlog
      MOTOR-1406 Duplicate
      PYTHON-4946 Backlog
      PHPLIB-1584 Duplicate
      RUBY-3586 Backlog
      RUST-2090 Backlog
      PHPLIB-1568 Fixed 1.21.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-5793 Backlog CXX-3166 Backlog CSHARP-5397 Backlog GODRIVER-3415 Backlog JAVA-5688 Backlog NODE-6511 Backlog MOTOR-1406 Duplicate PYTHON-4946 Backlog PHPLIB-1584 Duplicate RUBY-3586 Backlog RUST-2090 Backlog PHPLIB-1568 Fixed 1.21.0

      Summary

      The spec doesn't provide an API to rename every revisions of a filename. The proposed implementation is inefficient as it requires doing an update_one command for each revision, while it's more efficient to do an update_many with the filename as criteria.

      To rename multiple revisions of the same filename, users must retrieve the full list of files collection documents for a given filename and execute “rename” on each corresponding “_id”.

      The rename by filename API is necessary for PHP Stream Wrapper.

      Motivation

      Who is the affected end user?

      Applications that use a lot of revisions of the same filename.

      How does this affect the end user?

      Bad performance scaling when the number of revisions grows

      How likely is it that this problem or use case will occur?

      Edge case, maybe an incorrect usage of GridFS.

      If the problem does occur, what are the consequences and how severe are they?

      Degraded performances

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      PHPLIB implementation of GridFS stream wrapper

      Is this ticket only for tests?

      No

      Acceptance Criteria

      Update the spec to give a performant way to rename all revisions of a filename

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Andreas Braun Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: