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

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

    • Storage Engines
    • 2
    • 2024-05-28 - FOLLOW ON SPRINT
    • 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@mongodb.com Etienne Petrel
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: