Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60274

query collection A very slow after renameCollection A to B

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    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

      Attachments

        Activity

          People

            edwin.zhou@mongodb.com Edwin Zhou
            hustzjl@gmail.com Oneday Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: