Don't allow prefetch to be enabled for in-memory connection

XMLWordPrintableJSON

    • Storage Engines
    • 2024-05-28 - FOLLOW ON SPRINT
    • 2
    • v8.0

      If the WiredTiger connection is opened with in_memory=true, and prefetch_available=true we will create thread workers which won't prefetch anything. It seems odd to permit this configuration, instead we should detect the invalid configuration state and return an error.

      Most background threads check the in_memory state before starting:

      int
      __wt_checkpoint_cleanup_create(WT_SESSION_IMPL *session, const char *cfg[])
      {
          WT_CONFIG_ITEM cval;
          WT_CONNECTION_IMPL *conn;
          uint32_t session_flags;
      
          conn = S2C(session);
      
          if (F_ISSET(conn, WT_CONN_IN_MEMORY | WT_CONN_READONLY))
              return (0);
      

      This is a slightly different case as prefetch defaults to off, so a more reasonable thing to do is throw an EINVAL or similar in connection open.

            Assignee:
            Etienne Petrel
            Reporter:
            Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: