server/modules/selva/module/subscriptions.c
static void do_sub_marker_removal(RedisModuleCtx *ctx, SelvaModify_Hierarchy *hierarchy, struct Selva_SubscriptionMarker *marker) {
    if (marker->dir == SELVA_HIERARCHY_TRAVERSAL_NONE ||
            (marker->marker_flags & (SELVA_SUBSCRIPTION_FLAG_DETACH | SELVA_SUBSCRIPTION_FLAG_TRIGGER))) {
        (void)SVector_Remove(&hierarchy->subs.detached_markers.vec, marker);
    } else {
        /*
         * Other markers are normally pointed by one or more nodes in
         * the hierarchy.
         * If ctx is NULL we assume that the whole hierarchy will be
         * destroyed and thus there is no need to clear each marker.
         */
        if (ctx) {
            clear_node_sub(ctx, hierarchy, marker, marker->node_id);
        } else {
            fprintf(stderr, "%s:%d: Warning no RedisModuleCtx given. This usually means that the whole hierarchy key will be deleted.\n",
                    __FILE__, __LINE__);
        }
    }
    destroy_marker(marker);
}
/**
 * Clear and destroy a marker that has been already removed from the subscription.
 * The marker must have been removed from the sub->markers svector before
 * this function is called.
 */
Clear and destroy a marker that has been already removed from the subscription.
The marker must have been removed from the sub->markers svector before
this function is called.
Clear and destroy a marker that has been already removed from the subscription . The marker must have been removed from the sub - > markers svector before this function is called .
static void do_sub_marker_removal(RedisModuleCtx *ctx, SelvaModify_Hierarchy *hierarchy, struct Selva_SubscriptionMarker *marker) {
    if (marker->dir == SELVA_HIERARCHY_TRAVERSAL_NONE ||
            (marker->marker_flags & (SELVA_SUBSCRIPTION_FLAG_DETACH | SELVA_SUBSCRIPTION_FLAG_TRIGGER))) {
        (void)SVector_Remove(&hierarchy->subs.detached_markers.vec, marker);
    } else {
        if (ctx) {
            clear_node_sub(ctx, hierarchy, marker, marker->node_id);
        } else {
            fprintf(stderr, "%s:%d: Warning no RedisModuleCtx given. This usually means that the whole hierarchy key will be deleted.\n",
                    __FILE__, __LINE__);
        }
    }
    destroy_marker(marker);
}
static void do_sub_marker_removal ( RedisModuleCtx * ctx , SelvaModify_Hierarchy * hierarchy , struct Selva_SubscriptionMarker * marker ) { if ( marker -> dir == SELVA_HIERARCHY_TRAVERSAL_NONE || ( marker -> marker_flags & ( SELVA_SUBSCRIPTION_FLAG_DETACH | SELVA_SUBSCRIPTION_FLAG_TRIGGER ) ) ) { ( void ) SVector_Remove ( & hierarchy -> subs . detached_markers . vec , marker ) ; } else { if ( ctx ) { clear_node_sub ( ctx , hierarchy , marker , marker -> node_id ) ; } else { fprintf ( stderr , " \n " , __FILE__ , __LINE__ ) ; } } destroy_marker ( marker ) ; }
Clear and destroy a marker that has been already removed from the subscription.
Clear and destroy a marker that has been already removed from the subscription .
/*
         * Other markers are normally pointed by one or more nodes in
         * the hierarchy.
         * If ctx is NULL we assume that the whole hierarchy will be
         * destroyed and thus there is no need to clear each marker.
         */