Skip to content

Commit

Permalink
CacheRead: clear dir entry if doc is found to be truncated (#7064)
Browse files Browse the repository at this point in the history
(cherry picked from commit dd71b9d)
  • Loading branch information
traeak authored and zwoop committed Feb 12, 2021
1 parent 4af9679 commit 253e488
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iocore/cache/CacheRead.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 253e488

Please sign in to comment.