dunno
unread,Jul 2, 2012, 2:36:30 PM7/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hi,
I have a large update which clocks in at >120MBs. Yes, I understand
that the max document size is 16MB, but in my case, any WIP/
intermediate or final document isn't actually that large. The reason
for the update "bloat" is that I'm using dot notation on everything:
$set: {
Asset.SceneNodes.0x1234567890abcdef.Metadata.Subdata.
0xfedcba0987654321.LocalTransform.Position.X: 0,
Asset.SceneNodes.0x1234567890abcdef.Metadata.Subdata.
0xfedcba0987654321.LocalTransform.Position.Y: 0,
Asset.SceneNodes.0x1234567890abcdef.Metadata.Subdata.
0xfedcba0987654321.LocalTransform.Position.X: Z,
// ...ad nauseum
}
As you can see, the verbosity is quite high for what should amount to
very little final document size. The problem manifests as the MongoDB
C-driver's socket read receives a 0 from mongod.exe, thus closing the
socket. The mongod process still exists and responds to other sockets
(we have a connection pool going on), but the connection that the
update went through is dead now.
If you're wondering if I could use object notation, the answer is
probably a "no". To be able to update properly using object notation,
I'd need to know the before and after to calculate the diff (I need to
create an undo buffer out of this). And fetching the document from the
mongod process takes 5 seconds since it's an ~8MB document. If I just
set the field with the object I have, I stomp over potentially
existing data (stuff that I may not know about).
On the other hand, as for the option of breaking up the interior scene
nodes into individual documents...that's probably even worse as I then
have to update individual documents separately (each node gets
different data), which comes with a lot more overhead and eventual
latency.
My question is, has the buffer filled up and has mongod decided to
close the connection for good? Is there a variable somewhere where I
can jack this up and make a local patch? Since this is on the PC, I
don't care that much for larger temporary buffers (memory).
Alternatively, is there a way to force the update to interpret object
notation as dot notation? That would work as well.
Thanks for any help!