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

Infinite loop when trying to commit data larger than the cache

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: APIs
    • None
    • Storage Engines

      When attempting to commit a transaction with an update larger than the cache size, the system hangs at the end of the commit transaction APi call. The infinite loop is originates from __wti_evict_app_assist_worker.

      Here is the Python test to reproduce the bug:

      def api_call_with_wt_rollback_wt__oldest_for_eviction(self):
              """
              Try to insert a key value pair while the cache is full.
              """
              # Configure the connection with the min cache size.
              self.conn.reconfigure('cache_size=1MB')
      
              # Create a basic table.
              self.session.create(self.uri, 'key_format=S,value_format=S')
      
              cursor = self.session.open_cursor(self.uri)
      
              # Start a new transaction and insert a value far too large for cache.
              self.session.begin_transaction()
              cursor.set_key("key_a")
              cursor.set_value("a"*1024*5000)
              self.assertEqual(0, cursor.update())
              self.session.commit_transaction()
              # Let WiredTiger's accounting catch up.
              time.sleep(2)
      
              # Attempt to insert another value with the same transaction. This will result in the
              # application thread being pulled into eviction and getting rolled back.
              cursor.set_key("key_b")
              cursor.set_value("b"*1024)
      
              # Catch the default reason for WT_ROLLBACK errors.
              self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.update())
      

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            dylan.liang@mongodb.com Dylan Liang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: