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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.4.14, 3.6.4
    • Fix Version/s: 4.1.1
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      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

            Assignee:
            ben.judd Ben Judd
            Reporter:
            kyle.suarez Kyle Suarez
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: