ReadWriteSafeCache concurrency read-write (#6149)
This commit is contained in:
parent
e0a4c44036
commit
4ae4f0e76a
|
|
@ -52,6 +52,7 @@ Release Notes.
|
|||
* 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 istio version metric type on UI template mismatches the otel rule.
|
||||
* Improve ReadWriteSafeCache concurrency read-write performance
|
||||
|
||||
#### UI
|
||||
* Fix un-removed tags in trace query.
|
||||
|
|
|
|||
|
|
@ -85,10 +85,10 @@ public class ReadWriteSafeCache<T> {
|
|||
BufferedData<T> tempPointer = writeBufferPointer;
|
||||
writeBufferPointer = readBufferPointer;
|
||||
readBufferPointer = tempPointer;
|
||||
|
||||
return readBufferPointer.read();
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
// Call read method outside of write lock for concurrency read-write.
|
||||
return readBufferPointer.read();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue