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


##########
src/iocore/cache/StripeSM.cc:
##########
@@ -1342,7 +1366,15 @@ StripeSM::shutdown(EThread *shutdown_thread)
   // directories have not been inserted for these writes
   if (!this->_write_buffer.is_empty()) {
     Dbg(dbg_ctl_cache_dir_sync, "Dir %s: flushing agg buffer first", 
this->hash_text.get());
-    this->flush_aggregate_write_buffer(this->fd);
+    if (!this->flush_aggregate_write_buffer(this->fd)) {

Review Comment:
   I'm going to change shutdown sequence of cache, but it'll be big change, so 
as a workaround, I invalidate the stripe when AIO is in progress. ( 
54a2ec3402ba071787d8006cfb1cc7b0f5704aad )
   ```
     if (shm_backed && this->is_io_in_progress()) {
       Dbg(dbg_ctl_cache_dir_sync, "Dir %s: AIO write in flight -- invalidating 
shm copy, syncing dir to disk", this->hash_text.get());
       CacheShm::invalidate_stripe_directory(this->directory.raw_dir);
       shm_backed = false;
     }
   ```



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