anchor.diff:          TimeSeries ->
               FilteredTimeSeries = lists:foldl(fun(MetricId, Acc) ->
                   case maps:get(MetricId, TimeSeries, undefined) of
  -                    undefined when ErrorHandlingMode =:= fail_function -> throw({error, metric_not_found});
  +                    undefined when ErrorHandlingMode =:= fail_if_metric_is_missing -> throw({error, metric_not_found});
                       undefined -> Acc;
                       Metric -> maps:put(MetricId, Metric, Acc)
                   end
  
positive.code:         end
      end, [], ConfigMapExtension),
  
      SelectedHeads = select_heads(TimeSeriesCollectionHeads, MetricsToDelete, ignore),
      delete_time_series(maps:to_list(SelectedHeads), false, PersistenceCtx).
  
  
  
negative.code:     );
  
  update(Ctx, Id, NewTimestamp, MetricsToUpdateWithValues, Batch) ->
      update_internal(Ctx, Id, NewTimestamp, MetricsToUpdateWithValues, Batch, ignore_missing_metrics).
  
  -spec check_and_update(ctx(), collection_id(), ts_windows:timestamp(), update_range(), batch()) ->
      {ok | {error, term()}, batch()}.
  check_and_update(Ctx, Id, NewTimestamp, MetricsToUpdateWithValues, Batch) ->
      update_internal(Ctx, Id, NewTimestamp, MetricsToUpdateWithValues, Batch, fail_if_metric_is_missing).
  
  %%--------------------------------------------------------------------
  %% @private
  