Add support for readonly connections for disagg

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Checkpoints
    • None
    • Storage Engines
    • None
    • None
    • 0

      Running the disagg hook, test_readonly03.py fails:

      /home/dda/mongo/py3.10/bin/python3 ../test/suite/run.py --hook disagg readonly03
      ======================================================================
      ERROR: test_readonly03.test_readonly03.test_readonly
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wttest.py", line 243, in _callTestMethod
          method()
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/test_readonly03.py", line 70, in test_readonly
          self.reopen_conn()
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wttest.py", line 393, in reopen_conn
          self.open_conn(directory, config)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wttest.py", line 383, in open_conn
          self.conn = self.setUpConnectionOpen(directory)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/test_readonly03.py", line 56, in setUpConnectionOpen
          conn = self.wiredtiger_open(dir, conn_cfg)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wttest.py", line 356, in wiredtiger_open
          conn = wiredtiger.wiredtiger_open(home, config)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wthooks.py", line 202, in <lambda>
          f = lambda *args: hooked_function(wiredtiger, orig_func, hook_info_name, *args)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wthooks.py", line 125, in hooked_function
          ret = call_func(*args)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/hook_disagg.py", line 356, in <lambda>
          wiredtiger_open_replace(orig_wiredtiger_open, homedir, config))
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/hook_disagg.py", line 145, in wiredtiger_open_replace
          result = orig_wiredtiger_open(homedir, config)
      _wiredtiger.WiredTigerError: Operation not supported
      
      ======================================================================
      FAIL: test_readonly03.test_readonly03.test_readonly
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/wttest.py", line 571, in tearDown
          self.captureerr.check(self)
        File "/home/dda/wt/git/sls-1540-test-format-initial/test/suite/../py_utility/abstract_test_case.py", line 111, in check
          testcase.fail('unexpected ' + self.desc + ', contains: "' +
      AssertionError: unexpected error output, contains: "[1746797625:542044][4728:0xffff81ec24c0], checkpoint-pick-up: [WT_VERB_DEFAULT][ERROR]: __wt_cursor_notsup, 48: Unsupported cursor operation: Operation not supported
      "

      This is because during wiredtiger_open for an existing database, we must pick up a checkpoint. (In the test, we have a trick to get the latest checkpoint, for MongoDB usage, the server gives us checkpoint info in the configuration string). The problem is that picking up a checkpoint fills/alters the shared metadata file, and that's not a readonly operation. I suspect to get this to work, we'll need to do something like temporarily turn off the readonly flag when updating the metadata file.

      test_readonly03.py is currently disabled in test/suite/hook_disagg.fail

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: