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

Timeseries findAndModify uses the internal bucket namespace for profiling output instead of the user-aware namespace

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution NAMER
    • Fully Compatible
    • ALL
    • Execution NAMR Team 2023-10-02, Execution NAMR Team 2023-10-16
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The ns field in the time-series findAndModify profile output is using the internal bucket collection name instead of the user collection name:

      {
      	"op" : "command",
      	"ns" : "test.system.buckets.weather",  // Instead of test.weather
      	"command" : {
      		"findAndModify" : "weather",
                      ...
              }
              ...
      } 

      This is because in the findAndModify code, we set CurOp's `ns` using nsString (which is the bucket namespace if the collection is a time-series) instead of the nss (which comes from the client request).
       
      I think this could be a problem because
      1) It's inconsistent with insert/update/delete where we use the user collection name
      2) User should not be aware of the bucket collection.
       
      Additionally it seems that if the findAndModify request comes from mongos where it uses the two phase protocol, even the namespace in the request will be modified to use the bucket collection name, which means that we may need to translate it back to the user collection name for profiling on mongod.
       
      If we are going to fix this, we may also need to fix some tests which expect profiling outputs to have entries with the bucket namespace.

            Assignee:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: