Disable heartbeat propagation to avoid overloading clearinghouse and gshub 77/4777/1
authorvlad shkapenyuk <vshkap@research.att.com>
Thu, 24 Sep 2020 15:05:50 +0000 (11:05 -0400)
committervlad shkapenyuk <vshkap@research.att.com>
Thu, 24 Sep 2020 15:05:50 +0000 (11:05 -0400)
Signed-off-by: vlad shkapenyuk <vshkap@research.att.com>
Change-Id: I57132f752afb928d4a5af9bb4d254edb59d4b57a

include/hfta/hfta.h
src/ftacmp/generate_lfta_code.cc
src/lib/gscpapp/appinterface.c
src/lib/gscphost/clearinghouseregistries.c

index f9e3c87..d3f5db4 100644 (file)
@@ -455,7 +455,8 @@ gs_retval_t UNOP_HFTA_accept_packet (struct FTA *fta, FTAID *ftaid, void * packe
                memcpy(new_data + temp_tup.tuple_size + sizeof(gs_uint64_t) + tup_trace_sz * sizeof(fta_stat), (char*)&stats, sizeof(fta_stat));
 
                // Send a hearbeat message to clearinghouse.
-               fta_heartbeat(ftap->_fta.ftaid, trace_id, tup_trace_sz + 1, (fta_stat *)((char*)new_data + temp_tup.tuple_size + sizeof(gs_uint64_t)));
+               // Disable sending heartbeats for now to avoid overloading clearinghouse
+               // fta_heartbeat(ftap->_fta.ftaid, trace_id, tup_trace_sz + 1, (fta_stat *)((char*)new_data + temp_tup.tuple_size + sizeof(gs_uint64_t)));
 
                temp_tup.free_tuple();
                temp_tup.data = new_data;
@@ -484,7 +485,8 @@ gs_retval_t UNOP_HFTA_accept_packet (struct FTA *fta, FTAID *ftaid, void * packe
 gs_retval_t UNOP_HFTA_clock_fta(struct FTA *ftap) {
 
        // Send a hearbeat message to clearinghouse.to indicate we are alive
-       fta_heartbeat(ftap->ftaid, 0, 0, 0);
+       // Disable sending heartbeats for now to avoid overloading clearinghouse
+       // fta_heartbeat(ftap->ftaid, 0, 0, 0);
 
        return 0;
 }
@@ -1019,7 +1021,8 @@ gs_retval_t MULTOP_HFTA_accept_packet (struct FTA *fta, FTAID *ftaid, void * pac
                        memcpy(new_data + temp_tup.tuple_size + sizeof(gs_uint64_t) + tup_trace_sz * sizeof(fta_stat), (char*)&stats, sizeof(fta_stat));
 
                        // Send a hearbeat message to clearinghouse.
-                       fta_heartbeat(fta->ftaid, trace_id, tup_trace_sz + 1, (fta_stat *)((char*)new_data + temp_tup.tuple_size + sizeof(gs_uint64_t)));
+                       // Disable sending heartbeats for now to avoid overloading clearinghouse
+                       // fta_heartbeat(fta->ftaid, trace_id, tup_trace_sz + 1, (fta_stat *)((char*)new_data + temp_tup.tuple_size + sizeof(gs_uint64_t)));
 
                        // reset the stats
                        ftap->in_tuple_cnt = 0;
@@ -1121,7 +1124,8 @@ gs_retval_t MULTOP_HFTA_clock_fta(struct FTA *fta) {
        stats.cycle_cnt = ftap->cycle_cnt;
 
        // Send a hearbeat message to clearinghouse.
-       fta_heartbeat(fta->ftaid, ftap->trace_id++, 1, &stats);
+       // Disable sending heartbeats for now to avoid overloading clearinghouse
+       // fta_heartbeat(fta->ftaid, ftap->trace_id++, 1, &stats);
 
        // resets runtime stats
        ftap->in_tuple_cnt = 0;
index d6026bb..0594724 100644 (file)
@@ -2210,7 +2210,8 @@ string generate_fta_clock(string node_name, table_list *schema, unsigned time_co
        ret+="\tpost_tuple(tuple);\n";
 
        ret += "\n\t/* Send a heartbeat message to clearinghouse */\n";
-       ret += "\tfta_heartbeat(f->ftaid, t->trace_id++, 1, &stats);\n";
+       ret += "\n\t/* Disable heartbeats for now to avoid overloading clearinghouse */\n";     
+       ret += "\t/* fta_heartbeat(f->ftaid, t->trace_id++, 1, &stats); */\n";
 
        ret += "\n\t/* Reset runtime stats */\n";
        ret += "\tt->in_tuple_cnt = 0;\n";
index 961926f..029909f 100644 (file)
@@ -364,7 +364,8 @@ get_tuple_again:
 
         memcpy(trace_buffer + (sz * sizeof(fta_stat)), &myftaid, sizeof(FTAID));
 
-        fta_heartbeat(gscpipc_getftaid(), trace_id, sz+1, (fta_stat *)trace_buffer);
+        /* disable heartbeats for now to avoid overloading clearinghouse */
+        /* fta_heartbeat(gscpipc_getftaid(), trace_id, sz+1, (fta_stat *)trace_buffer); */
                free(trace_buffer);
         res=2; //indicate that it is a temporal tuple
     }
index 84dd266..6e67fa3 100644 (file)
@@ -182,10 +182,11 @@ gs_retval_t ftalookup_heartbeat(FTAID caller_id, gs_uint64_t trace_id,
     // to avoid sending redundant FTA instance stats to GSHUB we will only send statistics that have trace size of 1
        // for application heartbeats (streamid=0) we will only send last stat in their traces
     if ((sz == 1) || (trace[sz-1].ftaid.streamid == 0)) {
-        if (set_instancestats(gshub,get_instance_name(),&trace[sz-1])!=0) {
+        /* disable sending heartbeats for now to avoid overloading gshub */ 
+        /*if (set_instancestats(gshub,get_instance_name(),&trace[sz-1])!=0) {
                gslog(LOG_EMERG,"ERROR:could not set instancestats");
                return -1;
-               }
+               } */
 
     }