Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-5041

lock metric register confict error

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

Details

    Description

      There is a chance to see this error when write data to hudi with flink, and slot number per TM is larger than 1.

      java.lang.IllegalArgumentException: A metric named hudi_table1.lock.acquire.duration already exists

      The cause is in constructor of HoodieLockMetrics, when different thread from different slot of a Flink TM new HoodieLockMetrics, timer of identical metricName may registered to 

      MetricRegistry multiple time, causing this error.

      we can add synchronized statement in function 'createTimerForMetrics' to make the test and set action atomic to avoid adding a timer multiple times.

       

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            hbgstc123 HBG
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment