ruby/proto/gitaly/repository_services_pb.rb in gitaly-16.2.0.pre.rc2 vs ruby/proto/gitaly/repository_services_pb.rb in gitaly-16.2.0.pre.rc4
- old
+ new
@@ -21,10 +21,33 @@
# detailed information about the size of various sub-structures you should instead use the
# RepositoryInfo RPC.
rpc :RepositorySize, ::Gitaly::RepositorySizeRequest, ::Gitaly::RepositorySizeResponse
# RepositoryInfo returns detailed information about a repository and its data structures.
rpc :RepositoryInfo, ::Gitaly::RepositoryInfoRequest, ::Gitaly::RepositoryInfoResponse
+ # ObjectsSize calculates the total on-disk object size of reachable objects in bytes. In contrast
+ # to RepositorySize and RepositoryInfo, this RPC performs a graph walk of the specified revisions
+ # and will thus return an accurate view of how large the accumulated on-disk size of reachable
+ # objects is.
+ #
+ # As this RPC needs to perform a revision walk, it is significantly more expensive than the RPCs
+ # which simply check the size of on-disk data structures. On the other hand, it allows the caller
+ # to accurately compute the size of objects in a way that is at least somewhat detached from the
+ # on-disk representation:
+ #
+ # - Objects which exist in multiple packfiles will not be double-counted.
+ # - Objects which aren't reachable will not be accounted for.
+ # - It is possible to only account for a subset of references, e.g. only those that an admin
+ # would have direct control over.
+ #
+ # It is thus recommended to use this RPC whenever you want to calculate sizes which will end up
+ # being shown to the user.
+ #
+ # Note that the size is still bound to change when repositories are getting repacked and thus
+ # cannot be considered to be stable. This is because the on-disk size of any object can change
+ # depending on how Git decides to deltify it in a packfile. Thus, when a repack would cause a
+ # different delta base to be picked, the actual on-disk size of any given object may change.
+ rpc :ObjectsSize, stream(::Gitaly::ObjectsSizeRequest), ::Gitaly::ObjectsSizeResponse
# ObjectFormat determines the object format that is being used by the repository.
rpc :ObjectFormat, ::Gitaly::ObjectFormatRequest, ::Gitaly::ObjectFormatResponse
# This comment is left unintentionally blank.
rpc :ApplyGitattributes, ::Gitaly::ApplyGitattributesRequest, ::Gitaly::ApplyGitattributesResponse
# FetchRemote fetches references from a remote repository into the local
@@ -144,9 +167,13 @@
rpc :RemoveAll, ::Gitaly::RemoveAllRequest, ::Gitaly::RemoveAllResponse
# BackupRepository creates a full backup streamed directly to
# object-storage. The backup is created synchronously. The destination must
# be configured in config.backup.go_cloud_url
rpc :BackupRepository, ::Gitaly::BackupRepositoryRequest, ::Gitaly::BackupRepositoryResponse
+ # RestoreRepository restores a backup streamed directly from object-storage.
+ # The repository is restored synchronously. The source object-storage must
+ # be configured in config.backup.go_cloud_url
+ rpc :RestoreRepository, ::Gitaly::RestoreRepositoryRequest, ::Gitaly::RestoreRepositoryResponse
end
Stub = Service.rpc_stub_class
end
end