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

Update test_compact02 to handle eviction pressure message

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      During test_compact02, calls to session.compact() can fail due to eviction pressure. The test retries compaction in these cases, but still fails because it wasn't expecting the message WT issues when this happens.  

      I observed this in a recent WT patch build:

      https://spruce.mongodb.com/task/wiredtiger_macos_1012_unit_test_patch_7365ea188aaf1aa094824def8822d816752dcab2_5f1b321ee3c33156dbb7f085_20_07_24_19_10_43/logs

      Here's the failure message from the test:

      [2020/07/24 20:13:58.922] ERROR: test_compact02.test_compact02.test_compact02(table.1mb.default) (subunit.RemotedTestCase)
      [2020/07/24 20:13:58.922] test_compact02.test_compact02.test_compact02(table.1mb.default)
      [2020/07/24 20:13:58.922] ----------------------------------------------------------------------
      [2020/07/24 20:13:58.922] _StringException: Traceback (most recent call last):
      [2020/07/24 20:13:58.922]   File "/data/mci/4e249a45be00931511d247ca7c19287f/wiredtiger/test/suite/wttest.py", line 447, in tearDown
      [2020/07/24 20:13:58.922]     self.captureerr.check(self)
      [2020/07/24 20:13:58.922]   File "/data/mci/4e249a45be00931511d247ca7c19287f/wiredtiger/test/suite/wttest.py", line 109, in check
      [2020/07/24 20:13:58.922]     contents + '"')
      [2020/07/24 20:13:58.922]   File "/opt/mongodbtoolchain/stow/osx-python2-v3.TEr/lib/python2.7/unittest/case.py", line 410, in fail
      [2020/07/24 20:13:58.922]     raise self.failureException(msg)
      [2020/07/24 20:13:58.922] AssertionError: unexpected error output, contains: "[1595618434:673566][61707:0x7fffac8cf3c0], test_compact02.test_compact02.test_compact02(table.1mb.default), WT_SESSION.compact: __compact_worker, 300: compaction halted by eviction pressure: Resource busy
      [2020/07/24 20:13:58.922] [1595618440:983516][61707:0x7fffac8cf3c0], test_compact02.test_compact02.test_compact02(table.1mb.default), WT_SESSION.compact: __compact_worker, 300: compaction halted by eviction pressure: Resource busy
      [2020/07/24 20:13:58.922] [1595618447:650080][61707:0x7fffac8cf3c0], test_compact02.test_compact02.test_compact02(table.1mb.default), WT_SESSION.compact: __compact_worker, 300: compaction halted by eviction pressure: Resource busy
      [2020/07/24 20:13:58.922] "
      [2020/07/24 20:13:58.922] ----------------------------------------------------------------------
      

      We have seen this symptom before in WT-6328 and WT-3942.  In both cases the we increased the number of times the test retries compaction.  Currently we will attempt to compact up to 80 times.  But as the output above shows, the test only triggered the "compaction halted by eviction pressure" message three times.  So I believe the issue here is not the number of times we retry compaction, but rather that the test doesn't expect that message and fails if it sees it in the output.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            keith.smith@mongodb.com Keith Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: