ReshardingTxnCloner::_getNextRecord() can crash on exception

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.2.0-rc0
    • Component/s: None
    • None
    • Cluster Scalability
    • ALL
    • Cluster Scalability Priorities
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ReshardingTxnCloner::_getNextRecord() contains the following code:

          ON_BLOCK_EXIT([&pipeline] {
              pipeline.detachFromOperationContext();
          });
      

      This code assumes pipeline.detachFromOperationContext() is noexept, but currently this is not guaranteed from the pipeline API.

      To solve this, we either need to ensure that pipeline.detachFromOperationContext() is noexcept, or rewrite ReshardingTxnCloner::_getNextRecord() without the risk of an exception in a destructor.

      There is a similar issue in resharding_collection_cloner_test.cpp.

              Assignee:
              Abdul Qadeer
              Reporter:
              Romans Kasperovics
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: