X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fhfta%2Frunning_gb_operator.h;h=ca2e7fc0c9bd88a8bbc8b87868d29154489620bf;hb=52bf6cf53a585197f998187399ebfd88681d4490;hp=569bbc450e30f41731d9140a90b53cf254b175aa;hpb=dec9c93423775db0f4783a93145f016d5d780ffd;p=com%2Fgs-lite.git diff --git a/include/hfta/running_gb_operator.h b/include/hfta/running_gb_operator.h index 569bbc4..ca2e7fc 100644 --- a/include/hfta/running_gb_operator.h +++ b/include/hfta/running_gb_operator.h @@ -48,7 +48,7 @@ public: ret = func.create_group(tup, (gs_sp_t)&grp); nflushes = func.flush_needed(); if(func.disordered()){ - fprintf(stderr,"Out of order record in %s\n",op_name); + // fprintf(stderr,"Out of order record in %s\n",op_name); return 0; } @@ -74,11 +74,11 @@ public: if ((iter = group_table.find(grp)) != group_table.end()) { func.update_aggregate(tup, grp, (*iter).second); }else{ - aggregate aggr; + char aggr_buffer[sizeof(aggregate)]; // create an aggregate in preallocated buffer - func.create_aggregate(tup, (char*)&aggr); + func.create_aggregate(tup, aggr_buffer); // neeed operator= doing a deep copy - group_table.insert(grp, aggr); + group_table.insert(grp, (*(aggregate*)aggr_buffer)); } tup.free_tuple(); return 0; @@ -89,7 +89,7 @@ public: typename hash_table::iterator iter; // Limit the number of successive flushes - avoid explosive behavior - const gs_int32_t max_flushes = 10; + const gs_int32_t max_flushes = 25; if(nflushes>max_flushes){ fprintf(stderr,"Warning in operator %s, temporal advance of %d windows needed, max number of windows that can be reported at once is %d\n",op_name, nflushes, max_flushes); nflushes = max_flushes;