This is an automated email from the ASF dual-hosted git repository.
bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new dd71b9d CacheRead: clear dir entry if doc is found to be truncated
(#7064)
dd71b9d is described below
commit dd71b9d9fefa5a5de7a6dc68eb3f6b13ff341afa
Author: Brian Olsen <[email protected]>
AuthorDate: Fri Jan 29 06:17:40 2021 -0700
CacheRead: clear dir entry if doc is found to be truncated (#7064)
---
iocore/cache/CacheRead.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 6c89987..7cf8064 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -563,7 +563,6 @@ CacheVC::openReadReadDone(int event, Event *e)
VC_SCHED_LOCK_RETRY();
}
if (event == AIO_EVENT_DONE && !io.ok()) {
- dir_delete(&earliest_key, vol, &earliest_dir);
goto Lerror;
}
if (last_collision && // no missed lock
@@ -621,10 +620,11 @@ Lerror : {
if (request.valid()) {
int url_length;
const char *url_text = request.url_get()->string_get_ref(&url_length);
- Warning("Document %s truncated, url[%.*s]",
earliest_key.toHexStr(tmpstring), url_length, url_text);
+ Warning("Document %s truncated, url[%.*s] .. clearing",
earliest_key.toHexStr(tmpstring), url_length, url_text);
} else {
- Warning("Document %s truncated", earliest_key.toHexStr(tmpstring));
+ Warning("Document %s truncated .. clearing",
earliest_key.toHexStr(tmpstring));
}
+ dir_delete(&earliest_key, vol, &earliest_dir);
return calluser(VC_EVENT_ERROR);
}
Ldone: