未验证 提交 0950c1ad 编写于 作者: L lijial 提交者: GitHub

ArrayBlockingQueueBuffer del IF_POSSIBLE strategy (#6053)

* ArrayBlockingQueueBuffer del IF_POSSIBLE strategy

* update CHANGES.md
Co-authored-by: N李家良 <jialiang.li@tongdun.cn>
上级 1c534d8b
......@@ -20,6 +20,7 @@ Release Notes.
* Fix thrift plugin trace link broken when intermediate service does not mount agent
* Fix thrift plugin collects wrong args when the method without parameter.
* Fix DataCarrier's `org.apache.skywalking.apm.commons.datacarrier.buffer.Buffer` implementation isn't activated in `IF_POSSIBLE` mode.
* Fix ArrayBlockingQueueBuffer's useless `IF_POSSIBLE` mode list
#### OAP-Backend
* Make meter receiver support MAL.
......
......@@ -40,16 +40,12 @@ public class ArrayBlockingQueueBuffer<T> implements QueueBuffer<T> {
@Override
public boolean save(T data) {
switch (strategy) {
case IF_POSSIBLE:
return queue.offer(data);
default:
try {
queue.put(data);
} catch (InterruptedException e) {
// Ignore the error
return false;
}
//only BufferStrategy.BLOCKING
try {
queue.put(data);
} catch (InterruptedException e) {
// Ignore the error
return false;
}
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册