trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jplev...@apache.org
Subject svn commit: r1091628 - /trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
Date Wed, 13 Apr 2011 02:29:34 GMT
Author: jplevyak
Date: Wed Apr 13 02:29:34 2011
New Revision: 1091628

URL: http://svn.apache.org/viewvc?rev=1091628&view=rev
Log:
Fix for crasher from leif April 12, 2011, stale open directory "od"
needs to be revalidated when the partition lock is dropped.

Modified:
    trafficserver/traffic/trunk/iocore/cache/CacheRead.cc

Modified: trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheRead.cc?rev=1091628&r1=1091627&r2=1091628&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheRead.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheRead.cc Wed Apr 13 02:29:34 2011
@@ -181,7 +181,13 @@ CacheVC::openReadChooseWriter(int event,
   CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
   if (!lock)
     VC_SCHED_LOCK_RETRY();
-
+  od = vol->open_read(&first_key); // recheck in case the lock failed
+  if (!od) {
+    MUTEX_RELEASE(lock);
+    write_vc = NULL;
+    SET_HANDLER(&CacheVC::openReadStartHead);
+    return openReadStartHead(event, e);
+  }
   if (frag_type != CACHE_FRAG_TYPE_HTTP) {
     ink_assert(od->num_writers == 1);
     w = od->writers.head;



Mime
View raw message