Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-14150

Fix session::create documentation

    • Storage Engines
    • 2
    • StorEng - 2025-02-28

      The WT_SESSION::create documentation states:

      exclusive:
      fail if the object exists. When false (the default), if the object exists, check that its settings match the specified configuration.
      

      This is incorrect. If the file already exists and exclusive = false, then we silently fail according to:

          /* Check if the table already exists. */
          if ((ret = __wt_metadata_search(session, uri, &tablecfg)) != WT_NOTFOUND) {
              /*
               * Regardless of the 'exclusive' flag, we should raise an error if we try to import an
               * existing URI rather than just silently returning.
               */
              if (exclusive || import)
                  WT_TRET(EEXIST);
              goto err;
          }
      

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            sean.watt@mongodb.com Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: