[SERVER-6722] Cannot create a capped collection larger than 536608767 bytes on 32-bit systems Created: 06/Aug/12  Updated: 06/Dec/22  Resolved: 22/Feb/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mark porter Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04 - 32 bit & MongoDB v2.06.
Windows W2k8 -32 bit &MongoDB v2.06.


Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

32-bit versions have --smallfiles set, and this limits the maximum
size of any of the components files of a database.

The assertion being hit seems to be fixed in versions before 2.0.5 (as mentioned here) where the assertion was that the requested extent size was less than the maximum allowed, rather than less than or equal to the maximum. This was fixed here.

A 512 MB file is created, so we haven't run out of virtual address space yet, but nothing bigger than 512mb can be created.

Simple to reproduce:

Run mongod on 32-bit system.
Connect to mongo shell.
Open a database.
Run the following commands -

db.createCollection("my13", {capped:true, size:536608768})

and receive the following error

{
	"errmsg" : "exception: assertion db/pdfile.cpp:437",
	"code" : 0,
	"ok" : 0
}

whereas the following is ok

db.createCollection("my13", {capped:true, size:536608767})
{ "ok" : 1 }

I tried to reproduce on a x64 system with "--smallfiles", however, was unable to reproduce.



 Comments   
Comment by Martin Bligh [ 22/Feb/16 ]

not supporting 32 bits.

Generated at Thu Feb 08 03:12:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.