[SERVER-21727] period lose properties of document while the property is temporary add for update Created: 02/Dec/15  Updated: 04/Dec/15  Resolved: 04/Dec/15

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 3.0.5
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: pengrongxin Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

I have a document named of job,the as collection name is also job,the another collection named with autoSelectedJob,the data is read from job and save to by springdata on Every 5 minutes,so the autoSelectedJob collection data is all the same with job,

I have a temporary function that need add a top property,this time the job class
has not the top property,so i do some thing follow:

one:login in we mongodb server,exec the command of "db.job.update({},{$set:{"top":0}},false,true)",

two:modify job class add the top property and get set method

three:redeploy the new application

did after all this, We found The following strange problems:

the top property in collection of autoSelectedJob is period lose,some time exist in autoSelectedJob,some time is not exist while the task run three ,but all other properties of job is all exist,we mongo is a repset,i looked at primary

the data is follow:

set01:PRIMARY> db.autoSelectedJob.find({},{"top":1,"title":1}).sort({"top":-1}).limit(10)
{ "_id" : ObjectId("55d2a5f40cf2144809db4a7d"), "title" : "社区运营总监", "top" : 10 }
{ "_id" : ObjectId("561c6c230cf27f1039543f7a"), "title" : "web前端开发工程师", "top" : 9 }
{ "_id" : ObjectId("56446d9f0cf2baa0b8cbe975"), "title" : "系统架构师", "top" : 8 }
{ "_id" : ObjectId("562730000cf2c09b73614739"), "title" : "java资深开发工程师", "top" : 7 }
{ "_id" : ObjectId("561b4b410cf2945255c8ae69"), "title" : "JAVA技术经理", "top" : 6 }
{ "_id" : ObjectId("5626ff5c0cf2c09b73614523"), "title" : "web前端", "top" : 5 }
{ "_id" : ObjectId("561dc3760cf2de45c4ba7639"), "title" : "Java技术专家/架构师", "top" : 4 }
{ "_id" : ObjectId("56400fe20cf2dffa0f816bda"), "title" : "产品专家(APP方向)", "top" : 3 }
{ "_id" : ObjectId("56397ba90cf2c826abc4edfb"), "title" : "高级java工程师", "top" : 2 }
{ "_id" : ObjectId("563083d30cf261dd15cd7fd5"), "title" : "数据分析师", "top" : 1 }

after run three the task,the top property is not exist :

set01:PRIMARY> db.autoSelectedJob.find({},{"top":1,"title":1}).sort({"top":-1}).limit(10)
{ "_id" : ObjectId("55d56b9e0cf286511f9c9442"), "title" : "APP产品运营总监" }
{ "_id" : ObjectId("5608b64a0cf2092800de9cc9"), "title" : "ASP.NET软件工程师 " }
{ "_id" : ObjectId("55fb826e0cf2092800de9723"), "title" : "平台运营总监" }
{ "_id" : ObjectId("55a7178ae4b052832a2d7503"), "title" : "PHP网站架构师" }
{ "_id" : ObjectId("55c2feb60cf21ef6d0736585"), "title" : "产品经理" }
{ "_id" : ObjectId("55c955b70cf21ef6d07368bf"), "title" : "产品经理" }
{ "_id" : ObjectId("55b0c9650b745626e3bcf0be"), "title" : "资深原画师-场景方向" }
{ "_id" : ObjectId("55c1ad4de4b09e276d2daac2"), "title" : "Android资深开发工程师" }
{ "_id" : ObjectId("55c96776e4b09e276d2dafb2"), "title" : "系统架构师" }
{ "_id" : ObjectId("55c9bde5e4b0d1135ef4e27e"), "title" : "html5前端研发工程师" }

after run three the task,the top property is again exist:

set01:PRIMARY> db.autoSelectedJob.find({},{"top":1,"title":1}).sort({"top":-1}).limit(10)
{ "_id" : ObjectId("55d2a5f40cf2144809db4a7d"), "title" : "社区运营总监", "top" : 10 }
{ "_id" : ObjectId("561c6c230cf27f1039543f7a"), "title" : "web前端开发工程师", "top" : 9 }
{ "_id" : ObjectId("56446d9f0cf2baa0b8cbe975"), "title" : "系统架构师", "top" : 8 }
{ "_id" : ObjectId("562730000cf2c09b73614739"), "title" : "java资深开发工程师", "top" : 7 }
{ "_id" : ObjectId("561b4b410cf2945255c8ae69"), "title" : "JAVA技术经理", "top" : 6 }
{ "_id" : ObjectId("5626ff5c0cf2c09b73614523"), "title" : "web前端", "top" : 5 }
{ "_id" : ObjectId("561dc3760cf2de45c4ba7639"), "title" : "Java技术专家/架构师", "top" : 4 }
{ "_id" : ObjectId("56400fe20cf2dffa0f816bda"), "title" : "产品专家(APP方向)", "top" : 3 }
{ "_id" : ObjectId("56397ba90cf2c826abc4edfb"), "title" : "高级java工程师", "top" : 2 }
{ "_id" : ObjectId("563083d30cf261dd15cd7fd5"), "title" : "数据分析师", "top" : 1 }



 Comments   
Comment by Ramon Fernandez Marina [ 04/Dec/15 ]

Now worries pengrongxin, and thanks for the update. We're closing this ticket.

Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Comment by pengrongxin [ 04/Dec/15 ]

sorry ,we found the root cause of this problem ,we have author node deploy the application ,but code is not update,so a long time the application is not the top property

i am sorry!

Comment by pengrongxin [ 02/Dec/15 ]

I did follow test:
1 :I test at we test env is ok,no this problem,
2 : the task read every time is no problem,the top property is exist
3 : the object to DBObject is no problem,the top is exist tested by btrace

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