Skip to content

Commit c148671

Browse files
author
rstam
committed
CSHARP-941: Change default GridFS chunk size from 256KiB to 255KiB.
1 parent e488706 commit c148671

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

MongoDB.Driver/GridFS/MongoGridFSSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static MongoGridFSSettings()
4747
{
4848
__defaults = new MongoGridFSSettings
4949
{
50-
ChunkSize = 256 * 1024, // 256KiB
50+
ChunkSize = 255 * 1024, // 255KiB
5151
Root = "fs",
5252
UpdateMD5 = true,
5353
VerifyMD5 = true

MongoDB.DriverUnitTests/GridFS/MongoGridFSSettingsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void TestFixtureSetup()
3535
public void TestDefaults()
3636
{
3737
var settings = MongoGridFSSettings.Defaults;
38-
Assert.AreEqual(256 * 1024, settings.ChunkSize);
38+
Assert.AreEqual(255 * 1024, settings.ChunkSize);
3939
Assert.AreEqual("fs", settings.Root);
4040
Assert.AreEqual(true, settings.UpdateMD5);
4141
Assert.AreEqual(true, settings.VerifyMD5);

MongoDB.DriverUnitTests/GridFS/MongoGridFSTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void TestDownloadDontVerifyMD5()
185185
public void TestDownloadTwoChunks()
186186
{
187187
_gridFS.Delete(Query.Null);
188-
var contents = new string('x', 256 * 1024) + new string('y', 256 * 1024);
188+
var contents = new string('x', 255 * 1024) + new string('y', 255 * 1024);
189189
var bytes = Encoding.UTF8.GetBytes(contents);
190190
var stream = new MemoryStream(bytes);
191191
var fileInfo = _gridFS.Upload(stream, "TwoChunks.txt");

0 commit comments

Comments
 (0)