Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5672

TestLruBlockCache#testBackgroundEvictionThread fails occasionally

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.94.6, 0.95.0
    • None
    • None
    • Reviewed

    Description

      We find TestLruBlockCache#testBackgroundEvictionThread fails occasionally.

      I think it's a problem of the test case.
      Because runEviction() only do evictionThread.evict():

      public void evict() {
            synchronized(this) {
              this.notify(); // FindBugs NN_NAKED_NOTIFY
            }
          }
      

      However when we call evictionThread.evict(), the evictionThread may haven't been in run() in the TestLruBlockCache#testBackgroundEvictionThread.

      If we run the test many times, we could find failture easily.

      Attachments

        1. HBASE-5672.patch
          0.6 kB
          Chunhui Shen
        2. HBASE-5672v2.patch
          3 kB
          Chunhui Shen
        3. HBASE-5672v3.patch
          3 kB
          Chunhui Shen

        Activity

          People

            zjushch Chunhui Shen
            zjushch Chunhui Shen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: