This is an automated email from the ASF dual-hosted git repository.
eze pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/8.1.x by this push:
new 7d438be CacheRead: clear dir entry if doc is found to be truncated
(#7652)
7d438be is described below
commit 7d438be985b735d38514193e45eb09cba7f90016
Author: Brian Olsen <[email protected]>
AuthorDate: Thu Apr 15 16:06:58 2021 -0600
CacheRead: clear dir entry if doc is found to be truncated (#7652)
(cherry picked from commit 5b38fb26737b38267615102775d81136a843075c)
---
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 4bb3612..6a0bd72 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -565,7 +565,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
@@ -623,10 +622,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: