@@ -221,17 +221,12 @@ static int event_subscribe (struct kvs_ctx *ctx, const char *ns)
221221 * See issue #2779 for more information.
222222 */
223223
224- /* do not want to subscribe to events that are not within our
225- * namespace, so we subscribe to only specific ones.
226- */
227-
228224 if (!(ctx -> events_init )) {
229225
230226 /* These belong to all namespaces, subscribe once the first
231227 * time we init a namespace */
232228
233- if (flux_event_subscribe (ctx -> h , "kvs.stats.clear" ) < 0
234- || flux_event_subscribe (ctx -> h , "kvs.dropcache" ) < 0 ) {
229+ if (flux_event_subscribe (ctx -> h , "kvs.dropcache" ) < 0 ) {
235230 flux_log_error (ctx -> h , "flux_event_subscribe" );
236231 goto cleanup ;
237232 }
@@ -2180,44 +2175,6 @@ static void stats_get_cb (flux_t *h,
21802175 json_decref (nsstats );
21812176}
21822177
2183- static int stats_clear_root_cb (struct kvsroot * root , void * arg )
2184- {
2185- kvstxn_mgr_clear_noop_stores (root -> ktm );
2186- return 0 ;
2187- }
2188-
2189- static void stats_clear (struct kvs_ctx * ctx )
2190- {
2191- ctx -> faults = 0 ;
2192- memset (& ctx -> txn_commit_stats , '\0' , sizeof (ctx -> txn_commit_stats ));
2193-
2194- if (kvsroot_mgr_iter_roots (ctx -> krm , stats_clear_root_cb , NULL ) < 0 )
2195- flux_log_error (ctx -> h , "%s: kvsroot_mgr_iter_roots" , __FUNCTION__ );
2196- }
2197-
2198- static void stats_clear_event_cb (flux_t * h ,
2199- flux_msg_handler_t * mh ,
2200- const flux_msg_t * msg ,
2201- void * arg )
2202- {
2203- struct kvs_ctx * ctx = arg ;
2204-
2205- stats_clear (ctx );
2206- }
2207-
2208- static void stats_clear_request_cb (flux_t * h ,
2209- flux_msg_handler_t * mh ,
2210- const flux_msg_t * msg ,
2211- void * arg )
2212- {
2213- struct kvs_ctx * ctx = arg ;
2214-
2215- stats_clear (ctx );
2216-
2217- if (flux_respond (h , msg , NULL ) < 0 )
2218- flux_log_error (h , "%s: flux_respond" , __FUNCTION__ );
2219- }
2220-
22212178static int namespace_create (struct kvs_ctx * ctx ,
22222179 const char * ns ,
22232180 const char * rootref ,
@@ -2625,18 +2582,6 @@ static const struct flux_msg_handler_spec htab[] = {
26252582 stats_get_cb ,
26262583 FLUX_ROLE_USER
26272584 },
2628- {
2629- FLUX_MSGTYPE_REQUEST ,
2630- "kvs.stats-clear" ,
2631- stats_clear_request_cb ,
2632- 0
2633- },
2634- {
2635- FLUX_MSGTYPE_EVENT ,
2636- "kvs.stats-clear" ,
2637- stats_clear_event_cb ,
2638- 0
2639- },
26402585 {
26412586 FLUX_MSGTYPE_EVENT ,
26422587 "kvs.namespace-*-setroot" ,
0 commit comments