src/lib/udc.c 1.37
1.37 2010/03/19 19:16:37 angie
Grim reaper can take sparseData but not bitmap (esp. when we touch bitmap), so if bitmap exists but sparseData doesn't, get rid of bitmap. To reduce debugging headaches, use maybeTouchFile instead of touchFile.
Index: src/lib/udc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/udc.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -b -B -U 4 -r1.36 -r1.37
--- src/lib/udc.c 10 Mar 2010 23:44:05 -0000 1.36
+++ src/lib/udc.c 19 Mar 2010 19:16:37 -0000 1.37
@@ -599,13 +599,15 @@
struct udcBitmap *bits = udcBitmapOpen(file->bitmapFileName);
if (bits != NULL)
{
version = bits->version;
- if (bits->remoteUpdate != file->updateTime || bits->fileSize != file->size)
+ if (bits->remoteUpdate != file->updateTime || bits->fileSize != file->size ||
+ !fileExists(file->sparseFileName))
{
- verbose(2, "removing stale version (%lld! = %lld or %lld! = %lld), new version %d\n",
+ verbose(2, "removing stale version (%lld! = %lld or %lld! = %lld or %s doesn't exist), "
+ "new version %d\n",
bits->remoteUpdate, (long long)file->updateTime, bits->fileSize, file->size,
- version);
+ file->sparseFileName, version);
udcBitmapClose(&bits);
remove(file->bitmapFileName);
remove(file->sparseFileName);
++version;
@@ -830,9 +832,9 @@
memcpy(&(file->connInfo), &(info.ci), sizeof(struct connInfo));
// update cache file mod times, so if we're caching we won't do this again
// until the timeout has expired again:
if (udcCacheTimeout() > 0 && fileExists(file->bitmapFileName))
- touchFile(file->bitmapFileName);
+ (void)maybeTouchFile(file->bitmapFileName);
}
/* Make directory. */
makeDirsOnPath(file->cacheDir);