code: func (in DefaultHandler) ProcessMetricPoint(point schema.MetricPoint, format msg.Format, partition int32) {
  	if format == msg.FormatMetricPoint {
  		in.receivedMP.Inc()
  	} else {
  		in.receivedMPNO.Inc()
  	}
  	// in cassandra we store timestamps as 32bit signed integers.
  	// math.MaxInt32 = Jan 19 03:14:07 UTC 2038
  	if !point.Valid() || point.Time >= math.MaxInt32 {
  		in.invalidMP.Inc()
  		mdata.PromDiscardedSamples.WithLabelValues(invalidTimestamp, strconv.Itoa(int(point.MKey.Org))).Inc()
  		log.Debugf("in: Invalid metric %v", point)
  		return
  	}
  
  	archive, _, ok := in.metricIndex.Update(point, partition)
  
  	if !ok {
  		in.unknownMP.Inc()
  		mdata.PromDiscardedSamples.WithLabelValues(unknownPointId, strconv.Itoa(int(point.MKey.Org))).Inc()
  		return
  	}
  
  	m := in.metrics.GetOrCreate(point.MKey, archive.SchemaId, archive.AggId, uint32(archive.Interval))
  	m.Add(point.Time, point.Value)
  }
docs: // ProcessMetricPoint updates the index if possible, and stores the data if we have an index entry
  // concurrency-safe.