Improve sleepsecs()/sleepmicros() error reporting

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.7.6
    • Component/s: None
    • Environment:
      Linux
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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;
              }
      

            Assignee:
            Unassigned
            Reporter:
            Davide Italiano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: