Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3461

Don't hold locks as long when creating validators in AnnotationActionValidatorManager

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • 2.3.1
    • None
    • None
    • Patch

    Description

      Under load, the lock held in AnnotationActionValidatorManager.getValidators on validatorCache becomes contended. This lock is currently held while all the validators are created. The attached patch reduces the scope of the lock to just doing the cache lookup + taking a defensive copy of the list of validators for that key. This improved throughput and latency in our tests.

      Attachments

        1. validatormanager.patch
          3 kB
          Leigh Anderson
        2. WW-3461.patch
          5 kB
          Lukasz Lenart
        3. WW-3461.patch
          2 kB
          Maurizio Cucchiara
        4. thread_dump-20110615-1324.tar.bz2
          40 kB
          István Székely
        5. thread_dump-20110617-1253.tar.bz2
          12 kB
          István Székely

        Activity

          People

            lukaszlenart Lukasz Lenart
            bravesirrobin Leigh Anderson
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: