Fix some reporter.log errors by adding a few extra key membership checks.

This commit is contained in:
Vlad Grigorescu 2013-08-21 07:29:22 -04:00
parent e52b174594
commit 73a5106bd9

View file

@ -357,12 +357,16 @@ function request_all_current_keys(uid: string, ss_name: string, cleanup: bool)
event SumStats::send_no_key(uid: string, ss_name: string) event SumStats::send_no_key(uid: string, ss_name: string)
{ {
#print "send_no_key"; #print "send_no_key";
if ( uid !in done_with )
done_with[uid] = 0;
++done_with[uid]; ++done_with[uid];
if ( Cluster::worker_count == done_with[uid] ) if ( Cluster::worker_count == done_with[uid] )
{ {
delete done_with[uid]; delete done_with[uid];
if ( |stats_keys[uid]| > 0 ) if ( uid in stats_keys && |stats_keys[uid]| > 0 )
{ {
#print "we need more keys!"; #print "we need more keys!";
# Now that we have a key from each worker, lets # Now that we have a key from each worker, lets
@ -426,6 +430,9 @@ event SumStats::cluster_send_result(uid: string, ss_name: string, key: Key, resu
key_requests[uid] = compose_results(key_requests[uid], result); key_requests[uid] = compose_results(key_requests[uid], result);
# Mark that a worker is done. # Mark that a worker is done.
if ( uid !in done_with )
done_with[uid] = 0;
++done_with[uid]; ++done_with[uid];
#if ( Cluster::worker_count == done_with[uid] ) #if ( Cluster::worker_count == done_with[uid] )