Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-278

GridFS issues wrong update with a _closed attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:
      None
    • # Replies:
      2
    • Last comment by Customer:
      true

      Description

      When calling GridIn.close there's an interaction between self.closed = True and GridIn.setattr_. What this means is that right after closing GridIn there's an immediate and unnecessary update setting _closed field to true.

      If it is intended for user code to be able to set closed (and other underscore-starting fields) to arbitrary values, then GridIn.close should be changed to use object.setattr_(self, '_closed', True).

      If it was not intended then condition in _setattr_ should be changed to something like if self.closed and not name.startswith('')

      I'm not sure about priority, but I set it to Major because it greatly affects performance (the update is done using safe=True), floods oplog with these unnecessary updates and so is very annoying.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                7 years, 21 weeks ago
                Date of 1st Reply: