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

Consider other error codes before calling invariantWTOK in WiredTigerSession::getCursor()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.1
    • 3.4.14, 3.6.4
    • Storage
    • Fully Compatible
    • Storage NYC 2018-06-04, Storage NYC 2018-06-18

    Description

      When obtaining a new cursor, we call WT_SESSION::open_cursor(). We have an invariant that the return status is OK if the error is not ENOENT:

          int ret = _session->open_cursor(
              _session, uri.c_str(), NULL, forRecordStore ? "" : "overwrite=false", &c);
          if (ret != ENOENT)
              invariantWTOK(ret);
      

      If we hit the file limit, this call can also return EMFILE ("Too many open files"). We should consider either also checking for this (or similar) return codes so that we can crash with a friendlier error message, or make an fassertWTOK(), as this situation is not an invariant failure in the sense that we have made some sort of programming error.

      Attachments

        Activity

          People

            ben.judd Ben Judd
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: