Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-1418

LensClient is not thread safe

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7
    • client
    • None

    Description

      Using one lens client to fire two queries in two threads results in discrepencies. LensClient has a Map<QueryHandle, LensStatement> and also has a cached instance of LensStatement. When two threads fire queries, both use the same statement object. LensStatement object in turn caches LensQuery Object. So whichever thread fired query last is the last one to set lens query inside statement causing LensClient.getStatement().getQuery() to return that query object for all threads.

      Attachments

        1. LENS-1418.01.patch
          8 kB
          Rajat Khandelwal
        2. LENS-1418.03.patch
          8 kB
          Rajat Khandelwal
        3. LENS-1418.04.patch
          4 kB
          Rajat Khandelwal
        4. LENS-1418.05.patch
          2 kB
          Rajat Khandelwal
        5. LENS-1418.06.patch
          4 kB
          Rajat Khandelwal
        6. LENS-1418.07.patch
          3 kB
          Rajat Khandelwal

        Activity

          People

            prongs Rajat Khandelwal
            prongs Rajat Khandelwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: