code: func onAddTablePartition(t *meta.Meta, job *model.Job) (ver int64, _ error) {
  	partInfo := &model.PartitionInfo{}
  	err := job.DecodeArgs(&partInfo)
  	if err != nil {
  		job.State = model.JobStateCancelled
  		return ver, errors.Trace(err)
  	}
  
  	tblInfo, err := getTableInfoAndCancelFaultJob(t, job, job.SchemaID)
  	if err != nil {
  		job.State = model.JobStateCancelled
  		return ver, errors.Trace(err)
  	}
  	err = checkAddPartitionTooManyPartitions(uint64(len(tblInfo.Partition.Definitions) + len(partInfo.Definitions)))
  	if err != nil {
  		job.State = model.JobStateCancelled
  		return ver, errors.Trace(err)
  	}
  
  	err = checkAddPartitionValue(tblInfo, partInfo)
  	if err != nil {
  		job.State = model.JobStateCancelled
  		return ver, errors.Trace(err)
  	}
  
  	err = checkPartitionNameUnique(tblInfo, partInfo)
  	if err != nil {
  		job.State = model.JobStateCancelled
  		return ver, errors.Trace(err)
  	}
  
  	updatePartitionInfo(partInfo, tblInfo)
  	ver, err = updateVersionAndTableInfo(t, job, tblInfo, true)
  	if err != nil {
  		return ver, errors.Trace(err)
  	}
  	// Finish this job.
  	job.FinishTableJob(model.JobStateDone, model.StatePublic, ver, tblInfo)
  	return ver, errors.Trace(err)
  }
docs: // TODO: It may have the issue when two clients concurrently add partitions to a table.