You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the logic for determining whether the document limit needs to be applied, as well
as the application of it, into ClientBulkWriteOperation. This required a few small changes,
including:
* Retain and rename StoredDocumentSizeLimitCheckingBsonBinaryWriter to
DocumentSizeLimitCheckingBsonBinaryWriter, and use it in the encoder directly when necessary.
It might make sense to move DocumentSizeLimitCheckingBsonBinaryWriter into
ClientBulkWriteOperation. In order to do this, the BatchEncoder now has to know whether it
should apply the limit checking, and for that it requires both the maxDocumentLength, which
is accessible from the ConnectionDescription, and whether the write is acknowledged, which
is accessible from the WriteConcer.
* Pass BsonBinaryWriter instead of BsonWriter to the encoder so that it can be wrapped if
necessary. This is a bit unpleasant but seems ok, since what other kind of BsonWriter
would make sense inside of Connection?
0 commit comments