code: func (c *CasIdx) Update(point schema.MetricPoint, partition int32) (idx.Archive, int32, bool) {
  	pre := time.Now()
  
  	archive, oldPartition, inMemory := c.MemoryIndex.Update(point, partition)
  
  	if !c.cfg.updateCassIdx {
  		statUpdateDuration.Value(time.Since(pre))
  		return archive, oldPartition, inMemory
  	}
  
  	if inMemory {
  		// Cassandra uses partition id as the partitioning key, so an "update" that changes the partition for
  		// an existing metricDef will just create a new row in the table and won't remove the old row.
  		// So we need to explicitly delete the old entry.
  		if oldPartition != partition {
  			c.deleteDefAsync(point.MKey, oldPartition)
  		}
  
  		// check if we need to save to cassandra.
  		now := uint32(time.Now().Unix())
  		if archive.LastSave < (now - c.updateInterval32) {
  			archive = c.updateCassandra(now, inMemory, archive, partition)
  		}
  	}
  
  	statUpdateDuration.Value(time.Since(pre))
  	return archive, oldPartition, inMemory
  }
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