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

Improve sleepsecs()/sleepmicros() error reporting

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.7.6
    • None
    • Linux

    Description

      These two functions both call nanosleep() internally.
      If nanosleep fails, this is logged, but it's not very informational to diagnose where the problem is. Log example:

      2014-09-16T18:18:26.503+0000 [initandlisten] connection accepted from 54.68.48.43:54328 #32 (24 connections now open)
      nanosleep failed
      2014-09-16T18:18:37.149+0000 [conn24] insert test.foo12 ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:31 131ms

      The following could be enhanced to include at least errno, and maybe a backtrace to understand where nanosleep failed. The latter coul be probably showed only at a different log severity, let's say >= 2.

              if ( nanosleep( &t , &out ) ) {
                  std::cout << "nanosleep failed" << std::endl;
              }

      Attachments

        Activity

          People

            Unassigned Unassigned
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: