mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-22 06:40:01 +08:00
Close file at the end of runNetwork rather than in stopNetwork in order to avoid a race condition,
also in order to continue tracing the pending network thread activity. Poll event throttler only in the network thread in order to avoid a race condition.
This commit is contained in:
parent
46af909411
commit
4d6ec7663f
@ -2555,7 +2555,6 @@ void stopNetwork() {
|
|||||||
|
|
||||||
TraceEvent("ClientStopNetwork").log();
|
TraceEvent("ClientStopNetwork").log();
|
||||||
g_network->stop();
|
g_network->stop();
|
||||||
closeTraceFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseContext::updateProxies() {
|
void DatabaseContext::updateProxies() {
|
||||||
|
@ -591,6 +591,7 @@ void ThreadSafeApi::runNetwork() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TraceEvent("RunNetworkTerminating");
|
TraceEvent("RunNetworkTerminating");
|
||||||
|
closeTraceFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadSafeApi::stopNetwork() {
|
void ThreadSafeApi::stopNetwork() {
|
||||||
|
@ -454,7 +454,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ThreadFuture<Void> flush() {
|
ThreadFuture<Void> flush() {
|
||||||
traceEventThrottlerCache->poll();
|
if (TraceEvent::isNetworkThread()) {
|
||||||
|
traceEventThrottlerCache->poll();
|
||||||
|
}
|
||||||
|
|
||||||
MutexHolder hold(mutex);
|
MutexHolder hold(mutex);
|
||||||
bool roll = false;
|
bool roll = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user