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

Ensure dropCollection works in multitenant environment

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2022-09-19, Server Serverless 2022-10-03

      Currently, the replica set primary crashes with a segmentation fault on dropping a tenant collection.

      The replica set was started using the following feature flags:

       

      featureFlagMongoStore=true
      multitenancySupport=true
      

       

       

      db.runCommand({insert: "coll", documents: [{_id: 10}], $tenant: tenantId})
      db.runCommand({drop: "coll", $tenant: tenantId})
      

       

      Backtrace:

      {"t":{"$date":"2022-08-18T16:04:35.950+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC12757E9B6","b":"7FC126FC1000","o":"5BD9B6","s":"_ZN5mongo18stack_trace_detail12_GLOBAL__N_122LibunwindStepIterationC2ERNS_14StackTraceSinkE","C":"mongo::stack_trace_detail::(anonymous namespace)::LibunwindStepIteration::LibunwindStepIteration(mongo::StackTraceSink&)","s+":"76"}}}
      {"t":{"$date":"2022-08-18T16:04:35.950+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC12757E267","b":"7FC126FC1000","o":"5BD267","s":"_ZN5mongo18stack_trace_detail12_GLOBAL__N_119printStackTraceImplERKNS1_7OptionsEPNS_14StackTraceSinkE","C":"mongo::stack_trace_detail::(anonymous namespace)::printStackTraceImpl(mongo::stack_trace_detail::(anonymous namespace)::Options const&, mongo::StackTraceSink*)","s+":"87"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC12757E6E6","b":"7FC126FC1000","o":"5BD6E6","s":"_ZN5mongo15printStackTraceEv","C":"mongo::printStackTrace()","s+":"36"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC127572094","b":"7FC126FC1000","o":"5B1094","s":"_ZN5mongo12_GLOBAL__N_126printStackTraceNoRecursionEv","C":"mongo::(anonymous namespace)::printStackTraceNoRecursion()","s+":"34"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC127571820","b":"7FC126FC1000","o":"5B0820","s":"_ZN5mongo12_GLOBAL__N_123printSignalAndBacktraceEi","C":"mongo::(anonymous namespace)::printSignalAndBacktrace(int)","s+":"70"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC127571A4C","b":"7FC126FC1000","o":"5B0A4C","s":"abruptQuitWithAddrSignal","s+":"DC"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC124F988A0","b":"7FC124F86000","o":"128A0","s":"funlockfile","s+":"50"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA8487","b":"7FC10AAB4000","o":"1F4487","s":"_ZZZN5mongo12_GLOBAL__N_115_dropCollectionEPNS_16OperationContextERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEPNS_9DropReplyENS_34DropCollectionSystemCollectionModeES9_ENK3$_2clEvENKUlPNS_8DatabaseES5_E_clESH_S5_","C":"mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)::$_2::operator()() const::{lambda(mongo::Database*, mongo::NamespaceString const&)#1}::operator()(mongo::Database*, mongo::NamespaceString const&) const","s+":"E7"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA826C","b":"7FC10AAB4000","o":"1F426C","s":"_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_8DatabaseERKNS0_15NamespaceStringEEZZNS0_12_GLOBAL__N_115_dropCollectionEPNS0_16OperationContextES6_RKN5boost8optionalINS0_4UUIDEEEPNS0_9DropReplyENS0_34DropCollectionSystemCollectionModeESE_ENK3$_2clEvEUlS3_S6_E_E9_M_invokeERKSt9_Any_dataOS3_S6_","C":"std::_Function_handler<mongo::Status (mongo::Database*, mongo::NamespaceString const&), mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)::$_2::operator()() const::{lambda(mongo::Database*, mongo::NamespaceString const&)#1}>::_M_invoke(std::_Any_data const&, mongo::Database*&&, mongo::NamespaceString const&)","s+":"5C"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACAD8C8","b":"7FC10AAB4000","o":"1F98C8","s":"_ZNKSt8functionIFN5mongo6StatusEPNS0_8DatabaseERKNS0_15NamespaceStringEEEclES3_S6_","C":"std::function<mongo::Status (mongo::Database*, mongo::NamespaceString const&)>::operator()(mongo::Database*, mongo::NamespaceString const&) const","s+":"88"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA5A59","b":"7FC10AAB4000","o":"1F1A59","s":"_ZN5mongo12_GLOBAL__N_124_abortIndexBuildsAndDropEPNS_16OperationContextEONS_9AutoGetDbERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEOSt8functionIFNS_6StatusEPNS_8DatabaseES7_EEPNS_9DropReplyEbSB_","C":"mongo::(anonymous namespace)::_abortIndexBuildsAndDrop(mongo::OperationContext*, mongo::AutoGetDb&&, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, std::function<mongo::Status (mongo::Database*, mongo::NamespaceString const&)>&&, mongo::DropReply*, bool, boost::optional<mongo::UUID>)","s+":"EA9"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA4245","b":"7FC10AAB4000","o":"1F0245","s":"_ZZN5mongo12_GLOBAL__N_115_dropCollectionEPNS_16OperationContextERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEPNS_9DropReplyENS_34DropCollectionSystemCollectionModeES9_ENK3$_2clEv","C":"mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)::$_2::operator()() const","s+":"595"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA3A2A","b":"7FC10AAB4000","o":"1EFA2A","s":"_ZN5mongo18writeConflictRetryIZNS_12_GLOBAL__N_115_dropCollectionEPNS_16OperationContextERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEPNS_9DropReplyENS_34DropCollectionSystemCollectionModeESA_E3$_2EEDaS3_NS_10StringDataESH_OT_","C":"auto mongo::writeConflictRetry<mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)::$_2>(mongo::OperationContext*, mongo::StringData, mongo::StringData, mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)::$_2&&)","s+":"23A"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA1998","b":"7FC10AAB4000","o":"1ED998","s":"_ZN5mongo12_GLOBAL__N_115_dropCollectionEPNS_16OperationContextERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEPNS_9DropReplyENS_34DropCollectionSystemCollectionModeES9_","C":"mongo::(anonymous namespace)::_dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode, boost::optional<mongo::UUID>)","s+":"F8"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC10ACA16EB","b":"7FC10AAB4000","o":"1ED6EB","s":"_ZN5mongo14dropCollectionEPNS_16OperationContextERKNS_15NamespaceStringERKN5boost8optionalINS_4UUIDEEEPNS_9DropReplyENS_34DropCollectionSystemCollectionModeE","C":"mongo::dropCollection(mongo::OperationContext*, mongo::NamespaceString const&, boost::optional<mongo::UUID> const&, mongo::DropReply*, mongo::DropCollectionSystemCollectionMode)","s+":"21B"}}}
      {"t":{"$date":"2022-08-18T16:04:35.951+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":{"frame":{"a":"7FC0FD750193","b":"7FC0FD1A0000","o":"5B0193","s":"_ZN5mongo12_GLOBAL__N_17CmdDrop10Invocation8typedRunEPNS_16OperationContextE","C":"mongo::(anonymous namespace)::CmdDrop::Invocation::typedRun(mongo::OperationContext*)","s+":"193"}}}
      {"t":{"$date":"2022-08-18T16:04:35.952+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "tenant":"62fe63037bf28b8e32015f96","ctx":"conn3","msg":"Frame","attr":
      
      // I have truncated the logs after this.

       

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: