@@ -218,6 +218,7 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
218218 std::vector<LocalityData> unavailableLocals;
219219 LocalitySetRef logServerSet;
220220 LocalityMap<std::pair<WorkerInterface, ProcessClass>>* logServerMap;
221+ UID functionId = g_nondeterministic_random->randomUniqueID ();
221222 bool bCompleted = false ;
222223
223224 logServerSet = Reference<LocalitySet>(new LocalityMap<std::pair<WorkerInterface, ProcessClass>>());
@@ -230,7 +231,7 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
230231 }
231232 else {
232233 if (it.second .interf .locality .dataHallId ().present ())
233- TraceEvent (SevWarn," GWFTADNotAvailable" , id )
234+ TraceEvent (SevWarn," GWFTADNotAvailable" , functionId )
234235 .detail (" Fitness" , fitness)
235236 .detailext (" Zone" , it.second .interf .locality .zoneId ())
236237 .detailext (" DataHall" , it.second .interf .locality .dataHallId ())
@@ -243,7 +244,8 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
243244 .detail (" Locality" , it.second .interf .locality .toString ())
244245 .detail (" tLogReplicationFactor" , conf.tLogReplicationFactor )
245246 .detail (" tLogPolicy" , conf.tLogPolicy ? conf.tLogPolicy ->info () : " [unset]" )
246- .detail (" DesiredLogs" , conf.getDesiredLogs ());
247+ .detail (" DesiredLogs" , conf.getDesiredLogs ())
248+ .detail (" InterfaceId" , id);
247249 unavailableLocals.push_back (it.second .interf .locality );
248250 }
249251 }
@@ -258,12 +260,13 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
258260 logServerMap->add (worker.first .locality , &worker);
259261 }
260262 if (logServerSet->size () < conf.tLogReplicationFactor ) {
261- TraceEvent (SevWarn," GWFTADTooFew" , id )
263+ TraceEvent (SevWarn," GWFTADTooFew" , functionId )
262264 .detail (" Fitness" , fitness)
263265 .detail (" Processes" , logServerSet->size ())
264266 .detail (" tLogReplicationFactor" , conf.tLogReplicationFactor )
265267 .detail (" tLogPolicy" , conf.tLogPolicy ? conf.tLogPolicy ->info () : " [unset]" )
266- .detail (" DesiredLogs" , conf.getDesiredLogs ());
268+ .detail (" DesiredLogs" , conf.getDesiredLogs ())
269+ .detail (" InterfaceId" , id);
267270 }
268271 else if (logServerSet->size () <= conf.getDesiredLogs ()) {
269272 ASSERT (conf.tLogPolicy );
@@ -275,12 +278,13 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
275278 break ;
276279 }
277280 else {
278- TraceEvent (SevWarn," GWFTADNotAcceptable" , id )
281+ TraceEvent (SevWarn," GWFTADNotAcceptable" , functionId )
279282 .detail (" Fitness" , fitness)
280283 .detail (" Processes" , logServerSet->size ())
281284 .detail (" tLogReplicationFactor" , conf.tLogReplicationFactor )
282285 .detail (" tLogPolicy" , conf.tLogPolicy ? conf.tLogPolicy ->info () : " [unset]" )
283- .detail (" DesiredLogs" , conf.getDesiredLogs ());
286+ .detail (" DesiredLogs" , conf.getDesiredLogs ())
287+ .detail (" InterfaceId" , id);
284288 }
285289 }
286290 // Try to select the desired size, if larger
@@ -300,25 +304,27 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
300304 results.push_back (*object);
301305 tLocalities.push_back (object->first .locality );
302306 }
303- TraceEvent (" GWFTADBestResults" , id )
307+ TraceEvent (" GWFTADBestResults" , functionId )
304308 .detail (" Fitness" , fitness)
305309 .detail (" Processes" , logServerSet->size ())
306310 .detail (" BestCount" , bestSet.size ())
307311 .detail (" BestZones" , ::describeZones (tLocalities))
308312 .detail (" BestDataHalls" , ::describeDataHalls (tLocalities))
309313 .detail (" tLogPolicy" , conf.tLogPolicy ? conf.tLogPolicy ->info () : " [unset]" )
310314 .detail (" TotalResults" , results.size ())
311- .detail (" DesiredLogs" , conf.getDesiredLogs ());
315+ .detail (" DesiredLogs" , conf.getDesiredLogs ())
316+ .detail (" InterfaceId" , id);
312317 bCompleted = true ;
313318 break ;
314319 }
315320 else {
316- TraceEvent (SevWarn," GWFTADNoBest" , id )
321+ TraceEvent (SevWarn," GWFTADNoBest" , functionId )
317322 .detail (" Fitness" , fitness)
318323 .detail (" Processes" , logServerSet->size ())
319324 .detail (" tLogReplicationFactor" , conf.tLogReplicationFactor )
320325 .detail (" tLogPolicy" , conf.tLogPolicy ? conf.tLogPolicy ->info () : " [unset]" )
321- .detail (" DesiredLogs" , conf.getDesiredLogs ());
326+ .detail (" DesiredLogs" , conf.getDesiredLogs ())
327+ .detail (" InterfaceId" , id);
322328 }
323329 }
324330 }
@@ -331,7 +337,7 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
331337 tLocalities.push_back (object->first .locality );
332338 }
333339
334- TraceEvent (SevWarn, " GetTLogTeamFailed" )
340+ TraceEvent (SevWarn, " GetTLogTeamFailed" , functionId )
335341 .detail (" Policy" , conf.tLogPolicy ->info ())
336342 .detail (" Processes" , logServerSet->size ())
337343 .detail (" Workers" , id_worker.size ())
@@ -344,7 +350,8 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
344350 .detail (" DesiredLogs" , conf.getDesiredLogs ())
345351 .detail (" RatingTests" ,SERVER_KNOBS->POLICY_RATING_TESTS )
346352 .detail (" checkStable" , checkStable)
347- .detail (" PolicyGenerations" ,SERVER_KNOBS->POLICY_GENERATIONS ).backtrace ();
353+ .detail (" PolicyGenerations" ,SERVER_KNOBS->POLICY_GENERATIONS )
354+ .detail (" InterfaceId" , id).backtrace ();
348355
349356 // Free the set
350357 logServerSet->clear ();
@@ -356,14 +363,25 @@ std::vector<std::pair<WorkerInterface, ProcessClass>> getWorkersForTlogsAcrossDa
356363 id_used[result.first .locality .processId ()]++;
357364 }
358365
359- TraceEvent (" GetTLogTeamDone" )
366+ TraceEvent (" GetTLogTeamDone" , functionId )
360367 .detail (" Completed" , bCompleted).detail (" Policy" , conf.tLogPolicy ->info ())
361368 .detail (" Results" , results.size ()).detail (" Processes" , logServerSet->size ())
362369 .detail (" Workers" , id_worker.size ())
363370 .detail (" Replication" , conf.tLogReplicationFactor )
364371 .detail (" Desired" , conf.getDesiredLogs ())
365372 .detail (" RatingTests" ,SERVER_KNOBS->POLICY_RATING_TESTS )
366- .detail (" PolicyGenerations" ,SERVER_KNOBS->POLICY_GENERATIONS );
373+ .detail (" PolicyGenerations" ,SERVER_KNOBS->POLICY_GENERATIONS )
374+ .detail (" InterfaceId" , id);
375+
376+ for (auto & result : results) {
377+ TraceEvent (" GetTLogTeamWorker" , functionId)
378+ .detail (" Class" , result.second .toString ())
379+ .detail (" Address" , result.first .address ())
380+ .detailext (" Zone" , result.first .locality .zoneId ())
381+ .detailext (" DataHall" , result.first .locality .dataHallId ())
382+ .detail (" isExcludedServer" , conf.isExcludedServer (result.first .address ()))
383+ .detail (" isAvailable" , IFailureMonitor::failureMonitor ().getState (result.first .storage .getEndpoint ()).isAvailable ());
384+ }
367385
368386 // Free the set
369387 logServerSet->clear ();
0 commit comments