package
23.1.1+incompatible
Repository: https://github.com/dgraph-io/dgraph.git
Documentation: pkg.go.dev
# README
To update the protocol buffer definitions, run this from one directory above:
protoc -I worker worker/payload.proto --gofast_out=plugins=grpc:worker
# Functions
ApplyLicenseOverNetwork sends a request to apply the given enterprise license to a zero server.
AssignNsIdsOverNetwork sends a request to assign Namespace IDs to the current zero leader.
AssignUidsOverNetwork sends a request to assign UIDs to blank nodes to the current zero leader.
BackupGroup backs up the group specified in the backup request.
BlockingStop stops all the nodes, server between other workers and syncs all marks.
CommitOverNetwork makes a proxy call to Zero to commit or abort a transaction.
EnterpriseEnabled returns whether enterprise features can be used or not.
ExportOverNetwork sends export requests to all the known groups.
FillRestoreCredentials fills the empty values with the default credentials so that a restore request is sent to all the groups with the same credentials.
GetCredentialsFromRequest extracts the credentials from a backup request.
GetEEFeaturesList returns a list of Enterprise Features that are available.
GetManifest returns the master manifest using the given handler and uri.
GetManifestNoUpgrade returns the master manifest using the given handler and uri.
GetMembershipState returns the current membership state.
GetOngoingTasks returns the list of ongoing tasks.
GetSchemaOverNetwork checks which group should be serving the schema according to fingerprint of the predicate and sends it to that instance.
GetTypes processes the type requests and retrieves the desired types.
GroupId returns the group to which this worker belongs to.
Init initializes this package.
InitServerState initializes this server's state.
InitTasks initializes the global Tasks variable.
KnownGroups returns the known groups using the global groupi instance.
ListBackupManifests scans location l for backup files and returns the list of manifests.
LogDQLRequestEnabled returns true if logging of requests is enabled otherwise false.
MaxLeaseId returns the maximum UID that has been leased.
MoveTabletOverNetwork sends a request to move the given tablet to destination group to the current zero leader.
MutateOverNetwork checks which group should be running the mutations according to the group config and sends it to that instance.
NewS3Handler creates a new session, checks valid bucket at uri.Path, and configures a minio client.
NewUriHandler parses the requested URI and finds the corresponding UriHandler.
NodeId returns the raft id of the node.
NormalizeExportFormat returns the normalized string for the export format if it is valid, an empty string otherwise.
ProcessRestoreRequest verifies the backup data and sends a restore proposal to each group.
ProcessTaskOverNetwork is used to process the query and get the result from the instance which stores posting list corresponding to the predicate in the query.
RegisterZeroProxyServer forwards select GRPC calls over to Zero.
RemoveNodeOverNetwork sends a request to remove the given node from given group to a zero server.
we create MAP files each of a limited size and write sorted data into it.
RunOfflineRestore creates required DBs and streams the backups to them.
RunServer initializes a tcp server on port which listens to requests from other workers for pb.communication.
SetConfiguration sets the server configuration to the given config.
SortOverNetwork sends sort query over the network.
StartRaftNodes will read the WAL dir, create the RAFT groups, and either start or restart RAFT nodes.
StoreStats returns stats for data store.
SubscribeForUpdates will listen for updates for the given group.
TaskStatusOverNetwork fetches the status of a task over the network.
Timestamps sends a request to assign startTs for a new transaction to the current zero leader.
UpdateCacheMb updates the value of cache_mb and updates the corresponding cache sizes.
UpdateGQLSchemaOverNetwork sends the request to the group one leader for execution.
UpdateLogDQLRequest updates value of x.WorkerConfig.LogDQLRequest.
UpdateMembershipState contacts zero for an update on membership state.
ValidateAndConvert checks compatibility or converts to the schema type if the storage type is specified.
VerifyBackup will access the backup location and verify that the specified backup can be restored to the cluster.
WaitForIndexing does a busy wait for indexing to finish or the context to error out, if the input flag shouldWait is true.
# Constants
AllowMutations is the mode allowing all mutations.
NOTE: SuperFlag defaults must include every possible option that can be used.
DefaultExportFormat stores the name of the default format for exports.
Default limit on number of simultaneous open files on unix systems.
DisallowMutations is the mode that disallows all mutations.
MB represents a megabyte.
NoCache indicates no caches should be used.
StrictMutations is the mode that allows mutations if and only if they contain known preds.
Reserve the zero value for errors.
Reserve the zero value for errors.
UseTxnCache indicates the transaction cache should be used.
# Variables
AvailableMemory is the total size of the memory we were able to identify.
Config holds an instance of the server options..
ErrNonExistentTabletMessage is the error message sent when no tablet is serving a predicate.
State is the instance of ServerState used by the current server.
Tasks is a global persistent task queue.
# Structs
AclCache is the cache mapping group names to the corresponding group acls.
BackupProcessor handles the different stages of the backup process.
BackupRes is used to represent the response and error of the Backup gRPC call together to be transported via a channel.
CDC struct is being used to send out change data capture events.
LoadResult holds the output of a Load operation.
Manifest records backup details, these are values used during restore.
Options contains options for the Dgraph server.
ServerState holds the state of the Dgraph server.
# Type aliases
ExportedFiles has the relative path of files that were written during export.
FuncType represents the type of a query function (aggregation, has, etc).
TaskMeta stores a timestamp, a TaskKind and a Status.