mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 18:02:31 +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();
|
||||
g_network->stop();
|
||||
closeTraceFile();
|
||||
}
|
||||
|
||||
void DatabaseContext::updateProxies() {
|
||||
|
@ -591,6 +591,7 @@ void ThreadSafeApi::runNetwork() {
|
||||
}
|
||||
|
||||
TraceEvent("RunNetworkTerminating");
|
||||
closeTraceFile();
|
||||
}
|
||||
|
||||
void ThreadSafeApi::stopNetwork() {
|
||||
|
@ -454,7 +454,9 @@ public:
|
||||
}
|
||||
|
||||
ThreadFuture<Void> flush() {
|
||||
traceEventThrottlerCache->poll();
|
||||
if (TraceEvent::isNetworkThread()) {
|
||||
traceEventThrottlerCache->poll();
|
||||
}
|
||||
|
||||
MutexHolder hold(mutex);
|
||||
bool roll = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user