Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3835

TabletServerBatchReaderIterator concurrency contention on early close()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.8.0
    • client
    • None

    Description

      When running many batch scanners in a JVM, we see a significant amount of cache invalidation within the JVM when we prematurely close the batch scanner. When we prematurely close the batch scanner ( and threads within it are running an interrupt is sent to those threads, causing them to add the extents to the failures map and invalidate the cache. This causes lock contention on the write lock for the TabletLocatorImpl.

      The lock contention hinders performance in a highly parallel client that does not need to invalid the cache as a result of being stopped.

      As a positive test to ensure this was my problem I added a conditional check to the IOException handler in the run method of TabletServerBatchReaderIterator. The conditional checked whether the query thread pool was shut down. If it was not, we would invalidate the cache as we can assume the reason likely wasn't interruption. If it was shut down, we would not invalide the cache. This reduced lock contention dramatically and reduced runtime. This should cause no harm as any other failure would cause cache invalidation through some other route.

      Attachments

        Activity

          People

            ecn Eric C. Newton
            phrocker Marc Parisi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m