Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22633

MapDate provides the date incorrectly when Filter is cloned and used in multi-threads

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.6.1
    • 2.6.2
    • logsearch
    • None

    Description

      In AMBARI-22600, we cloned the Filter instance to assign the instance per child thread, which also clones the map of Mapper. Other Mapper implements only have String(s) type of fields hence thread-safe, but MapperDate has SimpleDateFormat type of fields which is known as non thread-safe, so cloning the Filter which has one or more MapperDate and using them concurrently makes multi-threads issue.

      For example I'm seeing the logdate improperly stored.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kabhwan Jungtaek Lim
            kabhwan Jungtaek Lim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment