[SERVER-9256] update fails when field contains more than 1012 characters Created: 05/Apr/13  Updated: 05/Apr/13  Resolved: 05/Apr/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.2.2, 2.4.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: nicholas wolff Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Reproduced on:

  • linux64 bits vith version 2.4.1
  • windows7 64 bits with version 2.2.2

Issue Links:
Duplicate
duplicates SERVER-5290 fail to insert docs with fields too l... Closed
Operating System: ALL
Steps To Reproduce:

Running mongo shell:

var c = db.test;
c.drop();
c.ensureIndex({'x' : 1});
c.insert({'_id' : 1, 'x' : Array(1012).join('a')});
c.insert({'_id' : 2, 'x' : Array(1013).join('b')})
c.find().forEach(function(o) {
	c.update(o, {'$set' : { x : 'new x'}});
})
c.find().forEach(function(o) {
	printjson(o);
})

Returns:

{ "_id" : 1, "x" : "new x" }
{ "_id" : 2, "x" : "bbbbbbbbbbbbbbbbbb....."}

Participants:

 Description   

Passing an object that has an indexed field with a value longer than 1012 to the update function fails to update:
In java the WriteResult says no error but getN() returns 0



 Comments   
Comment by Scott Hernandez (Inactive) [ 05/Apr/13 ]

This is a duplicate of SERVER-5290. The limit of an index entry is documented here http://docs.mongodb.org/manual/reference/limits/#indexes

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