Skip to content

Commit

Permalink
Address Chungg reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelweingartner committed May 13, 2024
1 parent f8fed0d commit 8a0dcec
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions gnocchi/storage/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ def _store_metric_splits(self, metrics_keys_aggregations_data_offset,
metric, key, agg.method, version)
metric_size = len(data)

MAP_UNAGGREGATED_METRIC_NAME_BY_SIZE[name] = metric_size
LOG.debug("Storing time series size [%s] for metric [%s].",
metric_size, name)
if metric_size > DEFAULT_RADOS_BUFFER_SIZE:
MAP_UNAGGREGATED_METRIC_NAME_BY_SIZE[name] = metric_size
LOG.debug(
"Storing time series size [%s] for metric [%s].",
metric_size, name)
if offset is None:
self.ioctx.write_full(name, data)
else:
Expand Down Expand Up @@ -247,9 +249,11 @@ def _store_unaggregated_timeseries_unbatched(
metric_name = self._build_unaggregated_timeserie_path(metric, version)
metric_size = len(data)

MAP_UNAGGREGATED_METRIC_NAME_BY_SIZE[metric_name] = metric_size
LOG.debug("Storing unaggregated time series size [%s] for metric [%s]",
metric_size, metric_name)
if metric_size > DEFAULT_RADOS_BUFFER_SIZE:
MAP_UNAGGREGATED_METRIC_NAME_BY_SIZE[metric_name] = metric_size
LOG.debug(
"Storing unaggregated time series size [%s] for metric [%s]",
metric_size, metric_name)
self.ioctx.write_full(metric_name, data)

def _get_object_content(self, name, buffer_size=DEFAULT_RADOS_BUFFER_SIZE):
Expand Down

0 comments on commit 8a0dcec

Please sign in to comment.