[SERVER-4776] improper application of modifiers with numerically equivalent string field names Created: 25/Jan/12  Updated: 11/Jul/16  Resolved: 22/Mar/12

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: buildbot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-5346 document field (key) magically change... Closed
Related
is related to SERVER-4777 'weird case' assertion when mods on t... Closed
Operating System: ALL
Participants:

 Description   

> c.drop()
true
> c.save( {'1':{},'01':{}} );
> c.update( {}, {$set:{'1.b':1,'1.c':2}} )
> c.find()
{ "_id" : ObjectId("4f1fb41dfb44be527d9e51b4"), "1" :

{ "b" : 1, "c" : 2 }

, "01" :

{ "b" : 1, "c" : 2 }

}

> c.drop()
true
> c.save( {'1':{},'01':{}} );
> c.update( {}, {$set:{'1.b':1,'01.c':2}} )
> c.find()
{ "_id" : ObjectId("4f1fb477fb44be527d9e51b5"), "1" : { "b" : 1, "" :

{ "b" : 1, "c" : 2 }

}, "01" :

{ "b" : 1, "c" : 2 }

}



 Comments   
Comment by Eliot Horowitz (Inactive) [ 09/May/12 ]

Not backporting now as its complicated and no reports.
Comment if you have a report.

Comment by auto [ 22/Mar/12 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4776 Fix server5346 test to work in v8 shell.
Branch: master
https://github.com/mongodb/mongo/commit/ddc9c57b5bb51022daf7adcb75f3256d40f9c0be

Comment by Eric Milkie [ 22/Mar/12 ]

The V8 build is failing server5346.js:
http://buildbot.mongodb.org:8081/builders/Linux%2064-bit%20v8/builds/3204/steps/test_6/logs/stdio

assert: [{
	"_id" : 1,
	"versions" : {
		"1" : 4,
		"01" : 3,
		"2_01" : 1,
		"2_1" : 2
	}
}] != [{
	"_id" : 1,
	"versions" : {
		"01" : 3,
		"1" : 4,
		"2_01" : 1,
		"2_1" : 2
	}
}] are not equal : undefined

Comment by auto [ 07/Mar/12 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4776 only use numeric comparison in updates when applying modifiers to an array
Branch: master
https://github.com/mongodb/mongo/commit/b17579687420f13afcb173f29556d89475d3f31b

Comment by Aaron Staple [ 31/Jan/12 ]

also handle cases of duplicate fields not being returned adjacently in sort order due to numeric equivalence of lexNumCmp, see SERVER-4777.

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