Closed kael-aiur closed 3 months ago
@kezhenxu94 Could you recheck?
@kael-aiur As you have addressed the issue, would you send a pull request to review?
@kezhenxu94 Could you recheck?
@kael-aiur As you have addressed the issue, would you send a pull request to review?
yeah, I will send a pull request later
Search before asking
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
I have a custom meter yaml:
when I have many instance to report this meter, sometime get exception stack like blow:
as
org.apache.skywalking.oap.meter.analyzer.dsl.counter.CounterWindow
are single instance, the windows which type ConcurrentHashMap will return the same PriorityQueue object for the same meter, when the same meter increase with concurrent call, some unexcpected exception will occur in PriorityQueue object, source code:What you expected to happen
for the same PriorityQueue, here a synchronization lock should be added to the window to ensure synchronization operations:
How to reproduce
Through a custom indicator configuration, it must contain an increase call, such as:
sw8_receive_request_total.sum(['service','instance','resource']).increase('PT1M')
, then use debug breakpoints to wait for a certain amount of custom indicators to be reported. At this time, release the breakpoints and run them all to reappear with a high probability.Anything else
In this way, you can see that some queues have been completely destroyed, size < 0, and this queue will permanently fail until the service is restarted.
Are you willing to submit a pull request to fix on your own?
Code of Conduct