Inconvenient destruction of mongoc_gridfs_file_t

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The problem is that after getting stream from mongoc_gridfs_file_t, it's impossible to destroy only stream, since during stream destruction gridfs_file is also destroyed. So it's causes at least to problems.

      1. In order to destroy gridfs_file you should know if stream was already opened and call mongoc_stream_destroy otherwise call mongoc_gridfs_file_destroy.
      2. It's impossible to reuse gridfs_file, because it's destroyed with stream.

            Assignee:
            Christian Hergert (Inactive)
            Reporter:
            Vahe Sahakyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: