code: func (txn *ProtoTxn) Commit(ctx context.Context) error {
  	txn.access.Lock()
  	defer txn.access.Unlock()
  
  	kvs := make(map[string]datasync.ChangeValue, len(txn.items))
  
  	for key, item := range txn.items {
  		changeType := datasync.Put
  		if item.delete {
  			changeType = datasync.Delete
  		}
  
  		kvs[key] = syncbase.NewChange(key, item.data, 0, changeType)
  	}
  
  	return txn.commit(ctx, kvs)
  }
docs: // Commit executes the transaction.