Skip to content

Commit b1183ad

Browse files
committed
PYTHON-785 No need for getlasterror before filemd5.
Obsoleted by commit fab611f.
1 parent fe8afce commit b1183ad

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

gridfs/grid_file.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,6 @@ def __flush(self):
244244
self.__flush_buffer()
245245

246246
db = self._coll.database
247-
248-
# See PYTHON-417, "Sharded GridFS fails with exception: chunks out
249-
# of order." Inserts via mongos, even if they use a single
250-
# connection, can succeed out-of-order due to the writebackListener.
251-
# We mustn't call "filemd5" until all inserts are complete, which
252-
# we ensure by calling getLastError (and ignoring the result).
253-
db.error()
254-
255247
md5 = db.command(
256248
"filemd5", self._id, root=self._coll.name,
257249
read_preference=ReadPreference.PRIMARY)["md5"]

0 commit comments

Comments
 (0)