void as_record_drop_stats(as_record* r, as_namespace* ns) { as_namespace_release_set_id(ns, as_index_get_set_id(r)); cf_atomic64_decr(&ns->n_objects); }
void as_namespace_release_set_id(as_namespace *ns, uint16_t set_id) { if (set_id == INVALID_SET_ID) { return; } as_set *p_set; if (cf_vmapx_get_by_index(ns->p_sets_vmap, set_id - 1, (void**)&p_set) != CF_VMAPX_OK) { return; } if (cf_atomic64_decr(&p_set->num_elements) < 0) { cf_warning(AS_NAMESPACE, "set_id %u - num_elements went negative!", set_id); } }