Log error when terminating process due to exception in recovery unit handler

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2024-04-15
    • 19
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Recovery unit handlers executed on commit/rollback are terminating the process in case any exception is thrown. In order to make debugging/troubleshooting easier, we should consider logging an error before terminating the process.

      Replace all

               } catch (...) {
                   std::terminate();
               }
      

      With

                 } catch (const DBException& ex) {
                    LOGV2_ERROR(number,
                             "Terminating the process due to unexpected failure in recovery unit handler",
                             "changeName"_attr = redact(demangleName(typeid(*change))),
                             "error"_attr = ex.toStatus());
                     std::terminate();
                 } catch (...) {
                    std::terminate();
                 }
      

              Assignee:
              Benety Goh
              Reporter:
              Pierlauro Sciarelli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: