code: func (m *UnpartitionedMemoryIdx) Update(point schema.MetricPoint, partition int32) (idx.Archive, int32, bool) {
  	pre := time.Now()
  
  	m.RLock()
  	defer m.RUnlock()
  
  	existing, ok := m.defById[point.MKey]
  	if ok {
  		if log.IsLevelEnabled(log.DebugLevel) {
  			log.Debugf("memory-idx: metricDef with id %v already in index", point.MKey)
  		}
  
  		bumpLastUpdate(&existing.LastUpdate, int64(point.Time))
  
  		oldPart := atomic.SwapInt32(&existing.Partition, partition)
  		statUpdate.Inc()
  		statUpdateDuration.Value(time.Since(pre))
  		return *existing, oldPart, true
  	}
  
  	return idx.Archive{}, 0, false
  }
docs: // Update updates an existing archive, if found.
  // It returns whether it was found, and - if so - the (updated) existing archive and its old partition