From 56bc0aed48412196531438dce3df8549edb7d1d8 Mon Sep 17 00:00:00 2001 From: Mattias Jakobsson Date: Tue, 11 Oct 2011 09:07:35 +0200 Subject: [PATCH 1/2] Changed max bson document size to 8mb (the new internal limit of mongo db) --- NoRM/Protocol/Messages/Message.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NoRM/Protocol/Messages/Message.cs b/NoRM/Protocol/Messages/Message.cs index cbac4ba8..2626255a 100644 --- a/NoRM/Protocol/Messages/Message.cs +++ b/NoRM/Protocol/Messages/Message.cs @@ -7,7 +7,7 @@ namespace Norm.Protocol /// public class Message { - protected const int FOUR_MEGABYTES = 4 * 1024 * 1024; + protected const int EIGHT_MEGABYTES = 8 * 1024 * 1024; /// TODO::Description. protected string _collection; @@ -44,7 +44,7 @@ protected Message(IConnection connection, string fullyQualifiedCollName) protected static byte[] GetPayload(X data) { var payload = BsonSerializer.Serialize(data); - if (payload.Length > FOUR_MEGABYTES) + if (payload.Length > EIGHT_MEGABYTES) { throw new DocumentExceedsSizeLimitsException(data, payload.Length); } From 0d9001f4a32b3b6c7a96571864d6ddbdf81cada6 Mon Sep 17 00:00:00 2001 From: Mattias Jakobsson Date: Tue, 11 Oct 2011 09:50:36 +0200 Subject: [PATCH 2/2] Changed the information --- NoRM/BSON/DocumentExceedsSizeLimitsException.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NoRM/BSON/DocumentExceedsSizeLimitsException.cs b/NoRM/BSON/DocumentExceedsSizeLimitsException.cs index e57688c8..68b94995 100644 --- a/NoRM/BSON/DocumentExceedsSizeLimitsException.cs +++ b/NoRM/BSON/DocumentExceedsSizeLimitsException.cs @@ -3,7 +3,7 @@ namespace Norm.BSON { /// - /// An exception that can be thrown by MongoCollection when the document is more than the MongoDB limit of 4MB. + /// An exception that can be thrown by MongoCollection when the document is more than the MongoDB limit of 8MB. /// /// /// The type of the document that was serialized.