Skip to content

Commit

Permalink
Fix possible unintentional flush() call in decomposition
Browse files Browse the repository at this point in the history
If the `strgp` uses decomposition, it does not `open()` the store and
hence does not have `store_handle` to `flush()`. The strgp with
decomposition should not call `flush()` store interface.
  • Loading branch information
narategithub authored and tom95858 committed Nov 17, 2023
1 parent 32d5252 commit 6574a6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ldms/src/ldmsd/ldmsd_strgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static void strgp_update_fn(ldmsd_strgp_t strgp, ldmsd_prdcr_set_t prd_set)
return;
}
strgp_decompose(strgp, prd_set);
goto out;
return;

/* store() interface routine */
store_routine:
Expand All @@ -218,7 +218,6 @@ static void strgp_update_fn(ldmsd_strgp_t strgp, ldmsd_prdcr_set_t prd_set)
}
strgp->store->store(strgp->store_handle, prd_set->set,
strgp->metric_arry, strgp->metric_count);
out:
if (strgp->flush_interval.tv_sec || strgp->flush_interval.tv_nsec) {
struct timespec expiry;
struct timespec now;
Expand Down

0 comments on commit 6574a6d

Please sign in to comment.