[ 
https://issues.apache.org/jira/browse/HUDI-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

HBG updated HUDI-5041:
----------------------
    Component/s: flink

> lock metric register confict error
> ----------------------------------
>
>                 Key: HUDI-5041
>                 URL: https://issues.apache.org/jira/browse/HUDI-5041
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: flink
>            Reporter: HBG
>            Priority: Major
>         Attachments: image-2022-10-17-17-56-27-971.png, 
> image-2022-10-17-18-02-14-951.png
>
>
> 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.
> !image-2022-10-17-17-56-27-971.png!
> we can add synchronized statement in function 'createTimerForMetrics' to make 
> the test and set action atomic to avoid adding a timer multiple times.
> !image-2022-10-17-18-02-14-951.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to