未验证 提交 4ae4f0e7 编写于 作者: A Andy Zhang 提交者: GitHub

ReadWriteSafeCache concurrency read-write (#6149)

上级 e0a4c440
...@@ -52,6 +52,7 @@ Release Notes. ...@@ -52,6 +52,7 @@ Release Notes.
* Fix the priority setting doesn't work of the ALS analyzers. * Fix the priority setting doesn't work of the ALS analyzers.
* Fix bug that `endpoint-name-grouping.yml` is not customizable in Dockerized case. * Fix bug that `endpoint-name-grouping.yml` is not customizable in Dockerized case.
* Fix bug that istio version metric type on UI template mismatches the otel rule. * Fix bug that istio version metric type on UI template mismatches the otel rule.
* Improve ReadWriteSafeCache concurrency read-write performance
#### UI #### UI
* Fix un-removed tags in trace query. * Fix un-removed tags in trace query.
......
...@@ -85,10 +85,10 @@ public class ReadWriteSafeCache<T> { ...@@ -85,10 +85,10 @@ public class ReadWriteSafeCache<T> {
BufferedData<T> tempPointer = writeBufferPointer; BufferedData<T> tempPointer = writeBufferPointer;
writeBufferPointer = readBufferPointer; writeBufferPointer = readBufferPointer;
readBufferPointer = tempPointer; readBufferPointer = tempPointer;
return readBufferPointer.read();
} finally { } finally {
lock.unlock(); lock.unlock();
} }
// Call read method outside of write lock for concurrency read-write.
return readBufferPointer.read();
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册