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

Should GridFS use a SON spec to find file chunks?

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      As of version 1.9 the GridFS implementation looks for file chunks like this:

      chunk = self.__chunks.find_one(

      {"files_id": self._id, "n": chunk_number}

      )

      But from my understanding of how indexes work, should it be using a SON object to maintain key ordering?

      This is how the chunks index is created:

      root_collection.chunks.ensure_index([("files_id", ASCENDING), ("n", ASCENDING)], unique=True)

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            unbeknownst unbeknownst
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: