[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Jan 3 05:56:49 UTC 2017
wsd/LOOLWSD.cpp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit dcdbb0af3fca38e19d2a3478ee6515944abd170b
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Jan 2 19:57:04 2017 -0500
wsd: cleanup logs in getNewChild
Change-Id: Ib5860556d08d162908cd95b5416d7d750d260cbd
Reviewed-on: https://gerrit.libreoffice.org/32673
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index b590c72..3725e95 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -449,6 +449,7 @@ static std::shared_ptr<ChildProcess> getNewChild()
const auto startTime = chrono::steady_clock::now();
do
{
+ LOG_DBG("getNewChild: Rebalancing children.");
int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
++numPreSpawn; // Replace the one we'll dispatch just now.
rebalanceChildren(numPreSpawn, false);
@@ -459,18 +460,22 @@ static std::shared_ptr<ChildProcess> getNewChild()
auto child = NewChildren.back();
NewChildren.pop_back();
const auto available = NewChildren.size();
- LOG_DBG("getNewChild: Have " << available << " spare " <<
- (available == 1 ? "child" : "children") << " after poping [" << child->getPid() << "].");
// Validate before returning.
if (child && child->isAlive())
{
- LOG_DBG("getNewChild: Returning new child [" << child->getPid() << "].");
+ LOG_DBG("getNewChild: Have " << available << " spare " <<
+ (available == 1 ? "child" : "children") <<
+ " after poping [" << child->getPid() << "] to return.");
return child;
}
- }
- LOG_WRN("getNewChild: No available child. Sending spawn request to forkit and failing.");
+ LOG_WRN("getNewChild: popped dead child, need to find another.");
+ }
+ else
+ {
+ LOG_WRN("getNewChild: No available child. Sending spawn request to forkit and failing.");
+ }
}
while (chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime).count() <
CHILD_TIMEOUT_MS * 4);
More information about the Libreoffice-commits
mailing list