Data can be lost if there is no free space on disk (v1.8.2)

43 views
Skip to first unread message

Denis

unread,
Aug 16, 2011, 12:20:35 PM8/16/11
to mongodb-user
MongoDB v1.8.2
It looks like a bug. It happens in case when a document is updated
with new size (e.g. re-sized by new fields and their values) and there
is no free space on disk to relocate the document with new size. That
is it looks like old document is removed but new one cannot be located
because of lack of free space on disk.

These are my actions:

// Do request
> db.test.find({_id:7421167},{Tags:1})

// Get the document
{ "_id" : 7421167 }

//Update the document with new field
> db.test.update({_id:7421167},{$set:{Tags:["LastUpdated","Visible","LastUpdatedBy","2011-08-01T16:24:36.497Z","2011-08-01T16:24:36.497Z"]}})

// Get error
can't map file memory

// Do the same request again
> db.test.find({_id:7421167},{Tags:1})
> // Get nothing

The following error is appeared on server console:
“CreateFileMapping failed D:/data/Origami/samsung.96 errno:1006 The
volume for a file has been externally altered so that the opened file
is no longer valid.”

Spencer Brody

unread,
Aug 17, 2011, 12:06:03 PM8/17/11
to mongodb-user
You're right, this is a bug. I have created a JIRA case for the bug:
https://jira.mongodb.org/browse/SERVER-3625.
Thanks for reporting this!

On Aug 16, 12:20 pm, Denis <dnandr...@gmail.com> wrote:
> MongoDB v1.8.2
> It looks like a bug. It happens in case when a document is updated
> with new size (e.g. re-sized by new fields and their values) and there
> is no free space on disk to relocate the document with new size. That
> is it looks like old document is removed but new one cannot be located
> because of lack of free space on disk.
>
> These are my actions:
>
> // Do request
>
> > db.test.find({_id:7421167},{Tags:1})
>
> // Get the document
> { "_id" : 7421167 }
>
> //Update the document with new field
>
> > db.test.update({_id:7421167},{$set:{Tags:["LastUpdated","Visible","LastUpda tedBy","2011-08-01T16:24:36.497Z","2011-08-01T16:24:36.497Z"]}})
Reply all
Reply to author
Forward
0 new messages