Commit 8ae35c0
authored
MINOR: add DCL on get or create meter for performance improvement (#22084)
We have synchronized on method `getOrCreateMeter()`. It will cause the
process lock here every time, it would be better to lock when we
actually need to create the meter, otherwise we can just return the
existed value.
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>1 parent 4ae78a3 commit 8ae35c0
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
0 commit comments