You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/01/11 12:27:36 UTC

[GitHub] [trafficserver] chenzunfeng opened a new issue #8597: writer_done() for ReadFromWriter

chenzunfeng opened a new issue #8597:
URL: https://github.com/apache/trafficserver/issues/8597


   https://github.com/apache/trafficserver/blob/71e4abada913ff35ad60d4d9c98e462b11b86c23/iocore/cache/P_CacheInternal.h#L759
   It seems that `CacheVC::writer_done()`  used to check whether `CacheVC::write_vc` is still in the OpenDir. I've read the code of this function, and I found the `for` loop below.
   ```c++
   for (; w && (w != write_vc || w->start_time > start_time); w = (CacheVC *)w->opendir_link.next) {
       ;
     }
   ```
   With the conditional statment `w->start_time > start_time`, I assume `write_vc` doesn't exist in the OpenDir anymore, we may still get a writer earlier than the current reader. So `writer_done()` will return `false`, but the previous writer `write_vc` has already left.
   The question is what does the condition `w->start_time > start_time` meant for.


-- 
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: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] chenzunfeng closed issue #8597: writer_done() for ReadFromWriter

Posted by GitBox <gi...@apache.org>.
chenzunfeng closed issue #8597:
URL: https://github.com/apache/trafficserver/issues/8597


   


-- 
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: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org