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

LensClient is not thread safe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7
    • Component/s: client
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: