[SERVER-60274] query collection A very slow after renameCollection A to B Created: 28/Sep/21  Updated: 01/Nov/21  Resolved: 01/Nov/21

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

Type: Bug Priority: Major - P3
Reporter: Oneday Zhang Assignee: Edwin Zhou
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I have a collection "nene_msg" where has many data and is online with high qps (2k qps). And I run: 
db.nene_msg.renameCollection("nene_msg_2021_09_27"),  
then after some minutes,   query from "nene_msg" online is very slow, from 1~3 milliseconds to hundreds of  milliseconds.
 
I use mongoTemplate to query online, and add index with background mode, such as:

//代码占位符
@CompoundIndex(name = "current_room_status_sender_dest_createTime",
 def = "{'" + ActionEventMO.Fields.currentRoomId + "': 1, '" + ActionEventMO.Fields.actionStatus + "': 1, '"
 + ActionEventMO.Fields.senderId + "': 1, '" + ActionEventMO.Fields.destId + "': 1, '" + ActionEventMO.Fields.createTime + "': 1}",
 background = true),

Could you please help me to find the reason?
Thanks a million.
 
The statistics of the document "nene_msg" is as follows:
DOCUMENTS
6.4m
TOTAL SIZE
18.2GB
AVG. SIZE
3.0KB



 Comments   
Comment by Edwin Zhou [ 01/Nov/21 ]

Hi hustzjl@gmail.com,

We haven’t heard back from you for some time, so I’m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Best,
Edwin

Comment by Edwin Zhou [ 25/Oct/21 ]

Hi hustzjl@gmail.com,

We still need additional information to diagnose the problem. If this is still an issue for you, would you please let us know what MongoDB version you're using, your cluster topology, and may you please archive (tar or zip) the $dbpath/diagnostic.data directory and attach it to this ticket? Please indicate the timestamps where the renameCollection was performed and when the change in performance is observed.

Best,
Edwin

Comment by Edwin Zhou [ 06/Oct/21 ]

Hi hustzjl@gmail.com,

Thanks for your report. Can you provide additional information that will aid us in this investigation?

  • What MongoDB version are you running?
  • What topology are you using?

Would you also please archive (tar or zip) the $dbpath/diagnostic.data directory (the contents are described here) and attach it to this ticket? Please indicate the timestamps where the renameCollection was performed and when the change in performance is observed.

Best,
Edwin

Generated at Thu Feb 08 05:49:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.