masaori335 commented on code in PR #12794:
URL: https://github.com/apache/trafficserver/pull/12794#discussion_r2692399883


##########
src/iocore/cache/Cache.cc:
##########
@@ -543,20 +565,24 @@ Cache::open_read(Continuation *cont, const CacheKey *key, 
CacheHTTPHdr *request,
   OpenDirEntry *od    = nullptr;
   CacheVC      *c     = nullptr;
 
+  // Read-While-Writer
+  // This OpenDirEntry lookup doesn't need stripe mutex lock because OpenDir 
has own reader-writer lock
+  od = stripe->open_read(key);

Review Comment:
   I guess this is fine, because prior to the change, when we jump to the 
`CacheVC::openReadFromWriter` from the `Lwriter` label, it's out of scope of 
StripeSM mutex lock. `CacheVC::openReadFromWriter` has another check of OpenDir.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to