Writes to ingest tables should be disallowed on leader

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Layered Tables
    • None
    • Storage Engines, Storage Engines - Foundations, Storage Engines - Persistence
    • SE Foundations - Q3+ Backlog
    • None

      Currently, it is possible to open a cursor on the ingest table of a layered table while running in leader mode, and apply dirty data directly to it. This is a violation of the layered table contract (more details on layered contracts here).

      The ingest table is only meant to apply updates from the oplog on follower nodes. On the leader, all writes must go directly to the stable table, and the ingest must remain empty or no-op.

      This scenario can be reproduced with the following python test:

      table_cfg = 'key_format=S,value_format=S,block_manager=disagg'
      uri = 'layered:test_verify_disagg'
      ingest_uri = 'file:test_verify_disagg.wt_ingest'
      
      # Create a layered table on the leader
      self.session.create(self.uri, self.table_cfg)
      self.session.checkpoint()
      
      # Open an ingest cursor
      ingest_cursor = self.session.open_cursor(self.ingest_uri, None, None)
      # write directly to the leaders ingest table
      ingest_cursor[str(1)] = 'value'
      ingest_cursor.close()
      
      

      Definition of done:

      • Disallowing writes to ingest table.
      • Raising an error if this is attempted.
      • Add testing to ensure this behaviour is disallowed

            Assignee:
            Mariam Mojid
            Reporter:
            Mariam Mojid
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: