You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/01/07 13:38:07 UTC
[GitHub] [skywalking] wu-sheng commented on a change in pull request #6149: ReadWriteSafeCache concurrency read-write
wu-sheng commented on a change in pull request #6149:
URL: https://github.com/apache/skywalking/pull/6149#discussion_r553331067
##########
File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/ReadWriteSafeCache.java
##########
@@ -34,9 +34,13 @@
*/
private volatile BufferedData<T> writeBufferPointer;
/**
- * Read/Write lock.
+ * Write-buffer lock.
+ *
+ * Access of read-buffer is no need to be locked,
+ * because only {@link org.apache.skywalking.oap.server.core.storage.PersistenceTimer}
+ * thread reads data from read-buffer. No concurrency reading exists.
*/
- private final ReentrantLock lock;
+ private final ReentrantLock writeLock;
Review comment:
Why rename this field? Basically, we don't change anything related to this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org