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

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

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

      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@mongodb.com Benety Goh
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: