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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: 3.4.14, 3.6.4
    • Component/s: Storage
    • Labels:
    • Fully Compatible
    • Storage NYC 2018-06-04, Storage NYC 2018-06-18

      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.

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

              Created:
              Updated:
              Resolved: