husky-team / husky

A more expressive and most importantly, more efficient system for distributed data analytics.
http://www.husky-project.com/
Other
98 stars 55 forks source link

[Aggregator] Fix Initialization of Aggregator Factory #285

Closed zzxx-husky closed 7 years ago

zzxx-husky commented 7 years ago

Fix #284

Remove call_once. Use std::mutex for the initialization of aggregator factory and that that works properly for the second initialization.

kygx-legend commented 7 years ago

If there's a concrete test case which can reproduce this problem, it's better.

zzxx-husky commented 7 years ago

@kygx-legend The problem could be easily reproduced in pyhusky, by submitting one job after another and the two jobs both need to use aggregator. In C++ Husky, I found it difficult to reproduce. @x@

kygx-legend commented 7 years ago

@zzxx-husky I see.

kygx-legend commented 7 years ago

Any problem for this PR?

zzxx-husky commented 7 years ago

@kygx-legend I forget to follow up. Should have no problem. I have also updated the names of the static variables.

kygx-legend commented 7 years ago

LGTM then. Thanks!