Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-508

Lock occurs when heavy traffic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0, 2.3.4
    • 2.3.5
    • Core
    • None
    • all platform

    Description

      In heavy traffic , lock occurs at com.ibatis.common.beans.ClassInfo#getInstance in case of cacheEnabled = true.
      It seems to be happend because of "double synchronized"

      ClassInfo.java

      private static final Map CLASS_INFO_MAP = Collections.synchronizedMap(new HashMap());

      public static ClassInfo getInstance(Class clazz) {
      if (cacheEnabled) {
      synchronized (clazz) {

      I think we get more concurrency to access getInstance if the synchronized clause in getInstance method is deleted.
      There is no side-effect to do this.
      #just created several useless ClassInfo objects

      Attachments

        1. iBATIS-508.patch
          2 kB
          Brian Lomeland

        Activity

          People

            kaig Kai Grabfelder
            ikedatka Takayuki Ikeda
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: