@@ -222,15 +222,6 @@ static int event_subscribe (struct kvs_ctx *ctx, const char *ns)
222222 */
223223
224224 if (!(ctx -> events_init )) {
225-
226- /* These belong to all namespaces, subscribe once the first
227- * time we init a namespace */
228-
229- if (flux_event_subscribe (ctx -> h , "kvs.dropcache" ) < 0 ) {
230- flux_log_error (ctx -> h , "flux_event_subscribe" );
231- goto cleanup ;
232- }
233-
234225 /* On rank 0, we need to listen for all of these namespace
235226 * events, all of the time. So subscribe to them just once on
236227 * rank 0. */
@@ -1171,62 +1162,6 @@ static void transaction_check_cb (flux_reactor_t *r,
11711162 * rpc/event callbacks
11721163 */
11731164
1174- static void dropcache_request_cb (flux_t * h , flux_msg_handler_t * mh ,
1175- const flux_msg_t * msg , void * arg )
1176- {
1177- struct kvs_ctx * ctx = arg ;
1178- int size , expcount = 0 ;
1179-
1180- /* irrelevant if root not initialized, drop cache entries */
1181-
1182- if (flux_request_decode (msg , NULL , NULL ) < 0 )
1183- goto error ;
1184- size = cache_count_entries (ctx -> cache );
1185- if ((expcount = cache_expire_entries (ctx -> cache , 0 )) < 0 ) {
1186- flux_log_error (ctx -> h , "%s: cache_expire_entries" , __FUNCTION__ );
1187- goto error ;
1188- }
1189- else {
1190- flux_log (h ,
1191- LOG_ALERT ,
1192- "dropped %d of %d cache entries" ,
1193- expcount ,
1194- size );
1195- }
1196- if (flux_respond (h , msg , NULL ) < 0 )
1197- flux_log_error (h , "%s: flux_respond" , __FUNCTION__ );
1198- return ;
1199- error :
1200- if (flux_respond_error (h , msg , errno , NULL ) < 0 )
1201- flux_log_error (h , "%s: flux_respond_error" , __FUNCTION__ );
1202- }
1203-
1204- static void dropcache_event_cb (flux_t * h ,
1205- flux_msg_handler_t * mh ,
1206- const flux_msg_t * msg ,
1207- void * arg )
1208- {
1209- struct kvs_ctx * ctx = arg ;
1210- int size , expcount = 0 ;
1211-
1212- /* irrelevant if root not initialized, drop cache entries */
1213-
1214- if (flux_event_decode (msg , NULL , NULL ) < 0 ) {
1215- flux_log_error (ctx -> h , "%s: flux_event_decode" , __FUNCTION__ );
1216- return ;
1217- }
1218- size = cache_count_entries (ctx -> cache );
1219- if ((expcount = cache_expire_entries (ctx -> cache , 0 )) < 0 )
1220- flux_log_error (ctx -> h , "%s: cache_expire_entries" , __FUNCTION__ );
1221- else {
1222- flux_log (h ,
1223- LOG_ALERT ,
1224- "dropped %d of %d cache entries" ,
1225- expcount ,
1226- size );
1227- }
1228- }
1229-
12301165static int heartbeat_root_cb (struct kvsroot * root , void * arg )
12311166{
12321167 struct kvs_ctx * ctx = arg ;
@@ -2600,18 +2535,6 @@ static const struct flux_msg_handler_spec htab[] = {
26002535 getroot_request_cb ,
26012536 FLUX_ROLE_USER
26022537 },
2603- {
2604- FLUX_MSGTYPE_REQUEST ,
2605- "kvs.dropcache" ,
2606- dropcache_request_cb ,
2607- 0
2608- },
2609- {
2610- FLUX_MSGTYPE_EVENT ,
2611- "kvs.dropcache" ,
2612- dropcache_event_cb ,
2613- 0
2614- },
26152538 {
26162539 FLUX_MSGTYPE_REQUEST ,
26172540 "kvs.disconnect" ,
0 commit comments