_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c157800
train
// NewFactory returns a Factory capable of creating runners for executing // charm hooks, actions and commands.
{ "resource": "" }
c157801
train
// NewCommandRunner exists to satisfy the Factory interface.
{ "resource": "" }
c157802
train
// NewHookRunner exists to satisfy the Factory interface.
{ "resource": "" }
c157803
train
// NewActionRunner exists to satisfy the Factory interface.
{ "resource": "" }
c157804
train
// prefixedInstances returns instances with the specified prefix.
{ "resource": "" }
c157805
train
// AdoptResources updates the controller tags on all instances to have the // new controller id. It's part of the Environ interface.
{ "resource": "" }
c157806
train
// NewStateCrossModelRelationsAPI creates a new server-side CrossModelRelations API facade // backed by global state.
{ "resource": "" }
c157807
train
// NewCrossModelRelationsAPI returns a new server-side CrossModelRelationsAPI facade.
{ "resource": "" }
c157808
train
// PublishRelationChanges publishes relation changes to the // model hosting the remote application involved in the relation.
{ "resource": "" }
c157809
train
// RegisterRemoteRelationArgs sets up the model to participate // in the specified relations. This operation is idempotent.
{ "resource": "" }
c157810
train
// WatchRelationUnits starts a RelationUnitsWatcher for watching the // relation units involved in each specified relation, and returns the // watcher IDs and initial values, or an error if the relation units could not be watched.
{ "resource": "" }
c157811
train
// RelationUnitSettings returns the relation unit settings for the given relation units.
{ "resource": "" }
c157812
train
// WatchRelationsSuspendedStatus starts a RelationStatusWatcher for // watching the life and suspended status of a relation.
{ "resource": "" }
c157813
train
// WatchOfferStatus starts an OfferStatusWatcher for // watching the status of an offer.
{ "resource": "" }
c157814
train
// PublishIngressNetworkChanges publishes changes to the required // ingress addresses to the model hosting the offer in the relation.
{ "resource": "" }
c157815
train
// InterfaceAddresses implements NetworkConfigSource.
{ "resource": "" }
c157816
train
// ListFull calls the List API server method.
{ "resource": "" }
c157817
train
// ConvertActionResults takes the results from the api and creates a map // suitable for format conversion to YAML or JSON.
{ "resource": "" }
c157818
train
// entities is a convenience constructor for params.Entities.
{ "resource": "" }
c157819
train
// SetMetricCredentials sets the metric credentials for the application specified.
{ "resource": "" }
c157820
train
// ModelUUID returns the model UUID from the client connection.
{ "resource": "" }
c157821
train
// Deploy obtains the charm, either locally or from the charm store, and deploys // it. Placement directives, if provided, specify the machine on which the charm // is deployed.
{ "resource": "" }
c157822
train
// GetConfig returns the charm configuration settings for each of the // applications. If any of the applications are not found, an error is // returned.
{ "resource": "" }
c157823
train
// getConfigV4 retrieves application config for versions of the API < 5.
{ "resource": "" }
c157824
train
// describeV5 will take the results of describeV4 from the apiserver // and remove the "default" boolean, and add in "source". // Mutates and returns the config map.
{ "resource": "" }
c157825
train
// SetCharm sets the charm for a given application.
{ "resource": "" }
c157826
train
// Update updates the application attributes, including charm URL, // minimum number of units, settings and constraints.
{ "resource": "" }
c157827
train
// UpdateApplicationSeries updates the application series in the db.
{ "resource": "" }
c157828
train
// AddUnits adds a given number of units to an application using the specified // placement directives to assign units to machines.
{ "resource": "" }
c157829
train
// DestroyUnits decreases the number of units dedicated to one or more // applications.
{ "resource": "" }
c157830
train
// SetGroupBy satisfies the builder interface.
{ "resource": "" }
c157831
train
// SetUpperLimit satisfies the builder interface.
{ "resource": "" }
c157832
train
// Wireup satisfies the builder interface. // If text columns are detected in the keys, then the function modifies // the primitive to pull a corresponding weight_string from mysql and // compare those instead. This is because we currently don't have the // ability to mimic mysql's collation behavior.
{ "resource": "" }
c157833
train
// ExecuteFetchAsDba will execute the given query, possibly disabling binlogs and reload schema.
{ "resource": "" }
c157834
train
// ExecuteFetchAsAllPrivs will execute the given query, possibly reloading schema.
{ "resource": "" }
c157835
train
// ExecuteFetchAsApp will execute the given query.
{ "resource": "" }
c157836
train
// newV2Resolver returns a keyspaceIDResolver for a v2 table. // V2 keyspaces have a preset sharding column name and type.
{ "resource": "" }
c157837
train
// newV3ResolverFromTableDefinition returns a keyspaceIDResolver for a v3 table.
{ "resource": "" }
c157838
train
// newV3ResolverFromColumnList returns a keyspaceIDResolver for a v3 table.
{ "resource": "" }
c157839
train
// Shutdown kills a ZooKeeper server, but keeps its data dir intact.
{ "resource": "" }
c157840
train
// Init generates a new config and then starts ZooKeeper.
{ "resource": "" }
c157841
train
// Teardown shuts down the server and removes its data dir.
{ "resource": "" }
c157842
train
// Inited returns true if the server config has been initialized.
{ "resource": "" }
c157843
train
// Init is the first phase of the server startup.
{ "resource": "" }
c157844
train
// fireOnTermSyncHooks returns true iff all the hooks finish before the timeout.
{ "resource": "" }
c157845
train
// ParseFlags initializes flags and handles the common case when no positional // arguments are expected.
{ "resource": "" }
c157846
train
// ParseFlagsWithArgs initializes flags and returns the positional arguments
{ "resource": "" }
c157847
train
// NewTxEngine creates a new TxEngine.
{ "resource": "" }
c157848
train
// AcceptReadWrite will start accepting all transactions. // If transitioning from RO mode, transactions might need to be // rolled back before new transactions can be accepts.
{ "resource": "" }
c157849
train
// AcceptReadOnly will start accepting read-only transactions, but not full read and write transactions. // If the engine is currently accepting full read and write transactions, they need to // be rolled back.
{ "resource": "" }
c157850
train
// Init must be called once when vttablet starts for setting // up the metadata tables.
{ "resource": "" }
c157851
train
// open opens the TxEngine. If 2pc is enabled, it restores // all previously prepared transactions from the redo log. // this should only be called when the state is already locked
{ "resource": "" }
c157852
train
// StopGently will disregard common rules for when to kill transactions // and wait forever for transactions to wrap up
{ "resource": "" }
c157853
train
// Close closes the TxEngine. If the immediate flag is on, // then all current transactions are immediately rolled back. // Otherwise, the function waits for all current transactions // to conclude. If a shutdown grace period was specified, // the transactions are rolled back if they're not resolved // by that time.
{ "resource": "" }
c157854
train
// prepareFromRedo replays and prepares the transactions // from the redo log, loads previously failed transactions // into the reserved list, and adjusts the txPool LastID // to ensure there are no future collisions.
{ "resource": "" }
c157855
train
// rollbackTransactions rolls back all open transactions // including the prepared ones. // This is used for transitioning from a master to a non-master // serving type.
{ "resource": "" }
c157856
train
// startWatchdog starts the watchdog goroutine, which looks for abandoned // transactions and calls the notifier on them.
{ "resource": "" }
c157857
train
// NewTxConn builds a new TxConn.
{ "resource": "" }
c157858
train
// Begin begins a new transaction. If one is already in progress, it commmits it // and starts a new one.
{ "resource": "" }
c157859
train
// Commit commits the current transaction. The type of commit can be // best effort or 2pc depending on the session setting.
{ "resource": "" }
c157860
train
// Rollback rolls back the current transaction. There are no retries on this operation.
{ "resource": "" }
c157861
train
// Resolve resolves the specified 2PC transaction.
{ "resource": "" }
c157862
train
// runSessions executes the action for all shardSessions in parallel and returns a consolildated error.
{ "resource": "" }
c157863
train
// runTargets executes the action for all targets in parallel and returns a consolildated error. // Flow is identical to runSessions.
{ "resource": "" }
c157864
train
// NewComboActionAgent creates an agent tailored specifically to run // within the vtcombo binary. It cannot be called concurrently, // as it changes the flags.
{ "resource": "" }
c157865
train
// Healthy reads the result of the latest healthcheck, protected by mutex. // If that status is too old, it means healthcheck hasn't run for a while, // and is probably stuck, this is not good, we're not healthy.
{ "resource": "" }
c157866
train
// BlacklistedTables returns the list of currently blacklisted tables.
{ "resource": "" }
c157867
train
// DisallowQueryService returns the reason the query service should be // disabled, if any.
{ "resource": "" }
c157868
train
// EnableUpdateStream returns if we should enable update stream or not
{ "resource": "" }
c157869
train
// Close prepares a tablet for shutdown. First we check our tablet ownership and // then prune the tablet topology entry of all post-init fields. This prevents // stale identifiers from hanging around in topology.
{ "resource": "" }
c157870
train
// Stop shuts down the agent. Normally this is not necessary, since we use // servenv OnTerm and OnClose hooks to coordinate shutdown automatically, // while taking lameduck into account. However, this may be useful for tests, // when you want to clean up an agent immediately.
{ "resource": "" }
c157871
train
// hookExtraEnv returns the map to pass to local hooks
{ "resource": "" }
c157872
train
// checkTabletMysqlPort will check the mysql port for the tablet is good, // and if not will try to update it. It returns the modified Tablet record, // if it was updated successfully in the topology server. // // We use the agent.waitingForMysql flag to log only the first // error we get when trying to get the port fr...
{ "resource": "" }
c157873
train
// ResultToProto3 converts Result to proto3.
{ "resource": "" }
c157874
train
// Proto3ToResult converts a proto3 Result to an internal data structure. This function // should be used only if the field info is populated in qr.
{ "resource": "" }
c157875
train
// CustomProto3ToResult converts a proto3 Result to an internal data structure. This function // takes a separate fields input because not all QueryResults contain the field info. // In particular, only the first packet of streaming queries contain the field info.
{ "resource": "" }
c157876
train
// Proto3ResultsEqual compares two arrays of proto3 Result. // reflect.DeepEqual shouldn't be used because of the protos.
{ "resource": "" }
c157877
train
// Proto3QueryResponsesEqual compares two arrays of proto3 QueryResponse. // reflect.DeepEqual shouldn't be used because of the protos.
{ "resource": "" }
c157878
train
// Proto3ValuesEqual compares two arrays of proto3 Value.
{ "resource": "" }
c157879
train
// SplitQueryResponsePartsEqual compares two arrays of SplitQueryResponse_Part.
{ "resource": "" }
c157880
train
// ParseStrictDDL is the same as Parse except it errors on // partially parsed DDL statements.
{ "resource": "" }
c157881
train
// SplitStatement returns the first sql statement up to either a ; or EOF // and the remainder from the given buffer
{ "resource": "" }
c157882
train
// SplitStatementToPieces split raw sql statement that may have multi sql pieces to sql pieces // returns the sql pieces blob contains; or error if sql cannot be parsed
{ "resource": "" }
c157883
train
// Walk calls visit on every node. // If visit returns true, the underlying nodes // are also visited. If it returns an error, walking // is interrupted, and the error is returned.
{ "resource": "" }
c157884
train
// String returns a string representation of an SQLNode.
{ "resource": "" }
c157885
train
// Append appends the SQLNode to the buffer.
{ "resource": "" }
c157886
train
// AddWhere adds the boolean expression to the // WHERE clause as an AND condition. If the expression // is an OR clause, it parenthesizes it. Currently, // the OR operator is the only one that's lower precedence // than AND.
{ "resource": "" }
c157887
train
// AddHaving adds the boolean expression to the // HAVING clause as an AND condition. If the expression // is an OR clause, it parenthesizes it. Currently, // the OR operator is the only one that's lower precedence // than AND.
{ "resource": "" }
c157888
train
// AffectedTables returns the list table names affected by the DDL.
{ "resource": "" }
c157889
train
// AddColumn appends the given column to the list in the spec
{ "resource": "" }
c157890
train
// AddIndex appends the given index to the list in the spec
{ "resource": "" }
c157891
train
// AddConstraint appends the given index to the list in the spec
{ "resource": "" }
c157892
train
// Format returns a canonical string representation of the type and all relevant options
{ "resource": "" }
c157893
train
// DescribeType returns the abbreviated type information as required for // describe table
{ "resource": "" }
c157894
train
// ParseParams parses the vindex parameter list, pulling out the special-case // "owner" parameter
{ "resource": "" }
c157895
train
// Format formats the node. The "CREATE VINDEX" preamble was formatted in // the containing DDL node Format, so this just prints the type, any // parameters, and optionally the owner
{ "resource": "" }
c157896
train
// FindColumn finds a column in the column list, returning // the index if it exists or -1 otherwise
{ "resource": "" }
c157897
train
// RemoveHints returns a new AliasedTableExpr with the hints removed.
{ "resource": "" }
c157898
train
// ToViewName returns a TableName acceptable for use as a VIEW. VIEW names are // always lowercase, so ToViewName lowercasese the name. Databases are case-sensitive // so Qualifier is left untouched.
{ "resource": "" }
c157899
train
// ReplaceExpr finds the from expression from root // and replaces it with to. If from matches root, // then to is returned.
{ "resource": "" }