Solr
  1. Solr
  2. SOLR-6685

ConcurrentModificationException in Overseer Stats API

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.10.1
    • Fix Version/s: 4.10.3, 5.0, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      I just found a concurrent modification exception in OverseerCollectionProcessor while iterating over the overseer stats. The iteration should be synchronized.

      1. SOLR-6685.patch
        3 kB
        Shalin Shekhar Mangar
      2. SOLR-6685.patch
        4 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        This patch changes the Stats map to be a ConcurrentHashMap and gets rid of the (inconsistent) synchronized blocks in the Stats methods. Synchronization is not required for iteration anymore. I found that failureDetails was being iterated without synchronization in OCP.getOverseerStatus.

        Show
        Shalin Shekhar Mangar added a comment - This patch changes the Stats map to be a ConcurrentHashMap and gets rid of the (inconsistent) synchronized blocks in the Stats methods. Synchronization is not required for iteration anymore. I found that failureDetails was being iterated without synchronization in OCP.getOverseerStatus.
        Hide
        Shalin Shekhar Mangar added a comment -

        Actually the iteration of failureDetails in OCP.getOverseerStats is not required because we return a copy of the original list.

        Show
        Shalin Shekhar Mangar added a comment - Actually the iteration of failureDetails in OCP.getOverseerStats is not required because we return a copy of the original list.
        Hide
        ASF subversion and git services added a comment -

        Commit 1636875 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1636875 ]

        SOLR-6685: ConcurrentModificationException in Overseer Status API

        Show
        ASF subversion and git services added a comment - Commit 1636875 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1636875 ] SOLR-6685 : ConcurrentModificationException in Overseer Status API
        Hide
        ASF subversion and git services added a comment -

        Commit 1636876 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1636876 ]

        SOLR-6685: ConcurrentModificationException in Overseer Status API

        Show
        ASF subversion and git services added a comment - Commit 1636876 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1636876 ] SOLR-6685 : ConcurrentModificationException in Overseer Status API
        Hide
        Shalin Shekhar Mangar added a comment -

        Reopening to backport it to 4.10.3

        Show
        Shalin Shekhar Mangar added a comment - Reopening to backport it to 4.10.3
        Hide
        ASF subversion and git services added a comment -

        Commit 1642729 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1642729 ]

        SOLR-6685: ConcurrentModificationException in Overseer Status API

        Show
        ASF subversion and git services added a comment - Commit 1642729 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1642729 ] SOLR-6685 : ConcurrentModificationException in Overseer Status API
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development