-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve YAML compliance of mgr:jobs report #1794
base: master
Are you sure you want to change the base?
Changes from all commits
d648cfd
9cba29b
d0ff4ab
5e57705
1d20c03
ae5f2bf
82508b1
b790a1e
31865ca
f44573b
a45698e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -133,12 +133,12 @@ BodyPipe::BodyPipe(Producer *aProducer): theBodySize(-1), | |||||
// TODO: teach MemBuf to start with zero minSize | ||||||
// TODO: limit maxSize by theBodySize, when known? | ||||||
theBuf.init(2*1024, MaxCapacity); | ||||||
debugs(91,7, "created BodyPipe" << status()); | ||||||
debugs(91,7, "created BodyPipe " << status()); | ||||||
} | ||||||
|
||||||
BodyPipe::~BodyPipe() | ||||||
{ | ||||||
debugs(91,7, "destroying BodyPipe" << status()); | ||||||
debugs(91,7, "destroying BodyPipe " << status()); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please take advantage of the touch to make this produce the log pattern detected by the
Suggested change
|
||||||
assert(!theProducer); | ||||||
assert(!theConsumer); | ||||||
theBuf.clean(); | ||||||
|
@@ -155,7 +155,7 @@ void BodyPipe::setBodySize(uint64_t aBodySize) | |||||
assert(!theConsumer); | ||||||
|
||||||
theBodySize = aBodySize; | ||||||
debugs(91,7, "set body size" << status()); | ||||||
debugs(91,7, "set body size " << status()); | ||||||
} | ||||||
|
||||||
uint64_t BodyPipe::bodySize() const | ||||||
|
@@ -194,13 +194,13 @@ void | |||||
BodyPipe::clearProducer(bool atEof) | ||||||
{ | ||||||
if (theProducer.set()) { | ||||||
debugs(91,7, "clearing BodyPipe producer" << status()); | ||||||
debugs(91,7, "clearing BodyPipe producer " << status()); | ||||||
theProducer.clear(); | ||||||
if (atEof) { | ||||||
if (!bodySizeKnown()) | ||||||
theBodySize = thePutSize; | ||||||
else if (bodySize() != thePutSize) | ||||||
debugs(91,3, "aborting on premature eof" << status()); | ||||||
debugs(91,3, "aborting on premature eof " << status()); | ||||||
} else { | ||||||
// asserta that we can detect the abort if the consumer joins later | ||||||
assert(!bodySizeKnown() || bodySize() != thePutSize); | ||||||
|
@@ -241,7 +241,7 @@ BodyPipe::setConsumerIfNotLate(const Consumer::Pointer &aConsumer) | |||||
Must(!abortedConsumption); // did not promise to never consume | ||||||
|
||||||
theConsumer = aConsumer; | ||||||
debugs(91,7, "set consumer" << status()); | ||||||
debugs(91,7, "set consumer " << status()); | ||||||
if (theBuf.hasContent()) | ||||||
scheduleBodyDataNotification(); | ||||||
if (!theProducer) | ||||||
|
@@ -254,7 +254,7 @@ void | |||||
BodyPipe::clearConsumer() | ||||||
{ | ||||||
if (theConsumer.set()) { | ||||||
debugs(91,7, "clearing consumer" << status()); | ||||||
debugs(91,7, "clearing consumer " << status()); | ||||||
theConsumer.clear(); | ||||||
// do not abort if we have not consumed so that HTTP or ICAP can retry | ||||||
// benign xaction failures due to persistent connection race conditions | ||||||
|
@@ -316,7 +316,7 @@ void | |||||
BodyPipe::enableAutoConsumption() | ||||||
{ | ||||||
mustAutoConsume = true; | ||||||
debugs(91,5, "enabled auto consumption" << status()); | ||||||
debugs(91,5, "enabled auto consumption " << status()); | ||||||
startAutoConsumptionIfNeeded(); | ||||||
} | ||||||
|
||||||
|
@@ -336,7 +336,7 @@ BodyPipe::startAutoConsumptionIfNeeded() | |||||
|
||||||
theConsumer = new BodySink(this); | ||||||
AsyncJob::Start(theConsumer); | ||||||
debugs(91,7, "starting auto consumption" << status()); | ||||||
debugs(91,7, "starting auto consumption " << status()); | ||||||
scheduleBodyDataNotification(); | ||||||
} | ||||||
|
||||||
|
@@ -381,7 +381,7 @@ BodyPipe::postConsume(size_t size) | |||||
{ | ||||||
assert(!isCheckedOut); | ||||||
theGetSize += size; | ||||||
debugs(91,7, "consumed " << size << " bytes" << status()); | ||||||
debugs(91,7, "consumed " << size << " bytes " << status()); | ||||||
if (mayNeedMoreData()) { | ||||||
AsyncCall::Pointer call= asyncCall(91, 7, | ||||||
"BodyProducer::noteMoreBodySpaceAvailable", | ||||||
|
@@ -396,7 +396,7 @@ BodyPipe::postAppend(size_t size) | |||||
{ | ||||||
assert(!isCheckedOut); | ||||||
thePutSize += size; | ||||||
debugs(91,7, "added " << size << " bytes" << status()); | ||||||
debugs(91,7, "added " << size << " bytes " << status()); | ||||||
|
||||||
// We should not consume here even if mustAutoConsume because the | ||||||
// caller may not be ready for the data to be consumed during this call. | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -81,7 +81,7 @@ Adaptation::Icap::ModXact::ModXact(Http::Message *virginHeader, | |||||
icapReply = new HttpReply; | ||||||
icapReply->protoPrefix = "ICAP/"; // TODO: make an IcapReply class? | ||||||
|
||||||
debugs(93,7, "initialized." << status()); | ||||||
debugs(93,7, "initialized. " << status()); | ||||||
} | ||||||
|
||||||
// initiator wants us to start | ||||||
|
@@ -131,7 +131,7 @@ void Adaptation::Icap::ModXact::waitForService() | |||||
disableRetries(); | ||||||
disableRepeats("ICAP service is not available"); | ||||||
|
||||||
debugs(93, 7, "will not wait for the service to be available" << | ||||||
debugs(93, 7, "will not wait for the service to be available " << | ||||||
status()); | ||||||
|
||||||
throw TexcHere("ICAP service is not available"); | ||||||
|
@@ -196,7 +196,7 @@ void Adaptation::Icap::ModXact::startShoveling() | |||||
requestBuf.init(); | ||||||
|
||||||
makeRequestHeaders(requestBuf); | ||||||
debugs(93, 9, "will write" << status() << ":\n" << | ||||||
debugs(93, 9, "will write " << status() << ":\n" << | ||||||
(requestBuf.terminate(), requestBuf.content())); | ||||||
|
||||||
// write headers | ||||||
|
@@ -237,7 +237,7 @@ void Adaptation::Icap::ModXact::handleCommWroteHeaders() | |||||
|
||||||
void Adaptation::Icap::ModXact::writeMore() | ||||||
{ | ||||||
debugs(93, 5, "checking whether to write more" << status()); | ||||||
debugs(93, 5, "checking whether to write more " << status()); | ||||||
|
||||||
if (writer != nullptr) // already writing something | ||||||
return; | ||||||
|
@@ -274,7 +274,7 @@ void Adaptation::Icap::ModXact::writeMore() | |||||
void Adaptation::Icap::ModXact::writePreviewBody() | ||||||
{ | ||||||
debugs(93, 8, "will write Preview body from " << | ||||||
virgin.body_pipe << status()); | ||||||
virgin.body_pipe << ' ' << status()); | ||||||
Must(state.writing == State::writingPreview); | ||||||
Must(virgin.body_pipe != nullptr); | ||||||
|
||||||
|
@@ -298,7 +298,7 @@ void Adaptation::Icap::ModXact::decideWritingAfterPreview(const char *kind) | |||||
else | ||||||
stopWriting(true); // ICAP server reply implies no post-preview writing | ||||||
|
||||||
debugs(93, 6, "decided on writing after " << kind << " preview" << | ||||||
debugs(93, 6, "decided on writing after " << kind << " preview " << | ||||||
status()); | ||||||
} | ||||||
|
||||||
|
@@ -490,12 +490,12 @@ void Adaptation::Icap::ModXact::stopWriting(bool nicely) | |||||
|
||||||
if (writer != nullptr) { | ||||||
if (nicely) { | ||||||
debugs(93, 7, "will wait for the last write" << status()); | ||||||
debugs(93, 7, "will wait for the last write " << status()); | ||||||
state.writing = State::writingAlmostDone; // may already be set | ||||||
checkConsuming(); | ||||||
return; | ||||||
} | ||||||
debugs(93, 3, "will NOT wait for the last write" << status()); | ||||||
debugs(93, 3, "will NOT wait for the last write " << status()); | ||||||
|
||||||
// Comm does not have an interface to clear the writer callback nicely, | ||||||
// but without clearing the writer we cannot recycle the connection. | ||||||
|
@@ -506,7 +506,7 @@ void Adaptation::Icap::ModXact::stopWriting(bool nicely) | |||||
ignoreLastWrite = true; | ||||||
} | ||||||
|
||||||
debugs(93, 7, "will no longer write" << status()); | ||||||
debugs(93, 7, "will no longer write " << status()); | ||||||
if (virginBodyWriting.active()) { | ||||||
virginBodyWriting.disable(); | ||||||
virginConsume(); | ||||||
|
@@ -520,7 +520,7 @@ void Adaptation::Icap::ModXact::stopBackup() | |||||
if (!virginBodySending.active()) | ||||||
return; | ||||||
|
||||||
debugs(93, 7, "will no longer backup" << status()); | ||||||
debugs(93, 7, "will no longer backup " << status()); | ||||||
virginBodySending.disable(); | ||||||
virginConsume(); | ||||||
} | ||||||
|
@@ -581,7 +581,7 @@ void Adaptation::Icap::ModXact::echoMore() | |||||
const size_t sizeMax = virginContentSize(virginBodySending); | ||||||
debugs(93,5, "will echo up to " << sizeMax << " bytes from " << | ||||||
virgin.body_pipe->status()); | ||||||
debugs(93,5, "will echo up to " << sizeMax << " bytes to " << | ||||||
debugs(93,5, "will echo up to " << sizeMax << " bytes to " << | ||||||
adapted.body_pipe->status()); | ||||||
|
||||||
if (sizeMax > 0) { | ||||||
|
@@ -595,12 +595,12 @@ void Adaptation::Icap::ModXact::echoMore() | |||||
} | ||||||
|
||||||
if (virginBodyEndReached(virginBodySending)) { | ||||||
debugs(93, 5, "echoed all" << status()); | ||||||
debugs(93, 5, "echoed all " << status()); | ||||||
stopSending(true); | ||||||
} else { | ||||||
debugs(93, 5, "has " << | ||||||
virgin.body_pipe->buf().contentSize() << " bytes " << | ||||||
"and expects more to echo" << status()); | ||||||
"and expects more to echo " << status()); | ||||||
// TODO: timeout if virgin or adapted pipes are broken | ||||||
} | ||||||
} | ||||||
|
@@ -619,7 +619,7 @@ void Adaptation::Icap::ModXact::stopSending(bool nicely) | |||||
debugs(93, 7, "Proceed with stop sending "); | ||||||
|
||||||
if (state.sending != State::sendingUndecided) { | ||||||
debugs(93, 7, "will no longer send" << status()); | ||||||
debugs(93, 7, "will no longer send " << status()); | ||||||
if (adapted.body_pipe != nullptr) { | ||||||
virginBodySending.disable(); | ||||||
// we may leave debts if we were echoing and the virgin | ||||||
|
@@ -628,7 +628,7 @@ void Adaptation::Icap::ModXact::stopSending(bool nicely) | |||||
stopProducingFor(adapted.body_pipe, nicely && !leftDebts); | ||||||
} | ||||||
} else { | ||||||
debugs(93, 7, "will not start sending" << status()); | ||||||
debugs(93, 7, "will not start sending " << status()); | ||||||
Must(!adapted.body_pipe); | ||||||
} | ||||||
|
||||||
|
@@ -643,13 +643,13 @@ void Adaptation::Icap::ModXact::checkConsuming() | |||||
if (!virgin.body_pipe || !state.doneConsumingVirgin()) | ||||||
return; | ||||||
|
||||||
debugs(93, 7, "will stop consuming" << status()); | ||||||
debugs(93, 7, "will stop consuming " << status()); | ||||||
stopConsumingFrom(virgin.body_pipe); | ||||||
} | ||||||
|
||||||
void Adaptation::Icap::ModXact::parseMore() | ||||||
{ | ||||||
debugs(93, 5, "have " << readBuf.length() << " bytes to parse" << status()); | ||||||
debugs(93, 5, "have " << readBuf.length() << " bytes to parse " << status()); | ||||||
debugs(93, 5, "\n" << readBuf); | ||||||
|
||||||
if (state.parsingHeaders()) | ||||||
|
@@ -708,7 +708,7 @@ void Adaptation::Icap::ModXact::bypassFailure() | |||||
reuseConnection = false; // be conservative | ||||||
cancelRead(); // may not work; and we cannot stop connecting either | ||||||
if (!doneWithIo()) | ||||||
debugs(93, 7, "Warning: bypass failed to stop I/O" << status()); | ||||||
debugs(93, 7, "Warning: bypass failed to stop I/O " << status()); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
|
||||||
service().noteFailure(); // we are bypassing, but this is still a failure | ||||||
|
@@ -1218,7 +1218,7 @@ void Adaptation::Icap::ModXact::stopParsing(const bool checkUnparsedData) | |||||
if (checkUnparsedData) | ||||||
Must(readBuf.isEmpty()); | ||||||
|
||||||
debugs(93, 7, "will no longer parse" << status()); | ||||||
debugs(93, 7, "will no longer parse " << status()); | ||||||
|
||||||
delete bodyParser; | ||||||
bodyParser = nullptr; | ||||||
|
@@ -1292,7 +1292,7 @@ Adaptation::Icap::ModXact::~ModXact() | |||||
// internal cleanup | ||||||
void Adaptation::Icap::ModXact::swanSong() | ||||||
{ | ||||||
debugs(93, 5, "swan sings" << status()); | ||||||
debugs(93, 5, "swan sings " << status()); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. method name "swanSong" makes the content text redundant.
Suggested change
|
||||||
|
||||||
stopWriting(false); | ||||||
stopSending(false); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take advantage of the touch to make this produce the log pattern detected by the
scripts/find-alive.pl
: