Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-63892

A work around for Hikari ProxyConnection/ProxyStatement thread safety issue.

    Details

      Description

      Hikari ProxyConnection keeps references to all ProxyStatement created from the same connection in a non-threadsafe com.zaxxer.hikari.util.FastList.

      On ProxyStatement closing, it untracks itself from ProxyConnection, which is just removing from com.zaxxer.hikari.util.FastList.

      In case of multiple ProxyStatements from different thread got closed concurrently, com.zaxxer.hikari.util.FastList will choke on concurrent removing by throwing random ArrayIndexOutOfBoundsException.

      As a work around, we synchronized on ProxyConnection around the ProxyStatement closing, but this should really be taken care of by the Hikari library, as different ProxyStatement objects are supposed to be used safely on different threads.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 32 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 CE RC1