Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2022-02-23 18:03:46 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2022-02-23 18:03:46 +0300
commit4aa327e5945251de81137a4f382d03dfc0eb354c (patch)
tree544fc367523a9fc62ad2ce0c082ca87a63bca1a5
parent59d695918d269f35a487c00c7b870aee124b9eaa (diff)
parent728c34fd9a6e3cff4a588935e6cd7a593e0d69d7 (diff)
Merge branch 'xx/fix-proto-comments-for-garbagecollect' into 'master'
Fix comments of GarbageCollectRequest used by gc See merge request gitlab-org/gitaly!4329
-rw-r--r--internal/git/reference.go9
-rw-r--r--proto/go/gitalypb/repository-service.pb.go6
-rw-r--r--proto/repository-service.proto6
3 files changed, 9 insertions, 12 deletions
diff --git a/internal/git/reference.go b/internal/git/reference.go
index 96a32190d..1ef994b59 100644
--- a/internal/git/reference.go
+++ b/internal/git/reference.go
@@ -1,8 +1,8 @@
package git
import (
- "bytes"
"context"
+ "io"
"strings"
)
@@ -99,16 +99,13 @@ func (e CheckRefFormatError) Error() string {
// CheckRefFormat checks whether a fully-qualified refname is well
// well-formed using git-check-ref-format
func CheckRefFormat(ctx context.Context, gitCmdFactory CommandFactory, refName string) (bool, error) {
- stdout := &bytes.Buffer{}
- stderr := &bytes.Buffer{}
-
cmd, err := gitCmdFactory.NewWithoutRepo(ctx,
SubCmd{
Name: "check-ref-format",
Args: []string{refName},
},
- WithStdout(stdout),
- WithStderr(stderr),
+ WithStdout(io.Discard),
+ WithStderr(io.Discard),
)
if err != nil {
return false, err
diff --git a/proto/go/gitalypb/repository-service.pb.go b/proto/go/gitalypb/repository-service.pb.go
index 8c578740f..4b76496ee 100644
--- a/proto/go/gitalypb/repository-service.pb.go
+++ b/proto/go/gitalypb/repository-service.pb.go
@@ -543,10 +543,10 @@ type GarbageCollectRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
CreateBitmap bool `protobuf:"varint,2,opt,name=create_bitmap,json=createBitmap,proto3" json:"create_bitmap,omitempty"`
- // If set to 'true' the 'gc' will be triggered with '--prune=24.hours.ago' flag.
- // This will remove dangling objects from the object storage that were not modified in the last 24 hours.
+ // If set to 'true' the 'gc' will be triggered with '--prune=30.minutes.ago' flag.
+ // This will remove dangling objects from the object storage that were not modified in the last 30 minutes.
// If 'false' provided the 'gc' will rely on the default expiration period (2 weeks).
- // The window of 24 hours exists because of possible concurrent operations running on the same
+ // The window of 30 minutes exists because of possible concurrent operations running on the same
// storage and removal of the objects may cause races and fail concurrent operations.
Prune bool `protobuf:"varint,3,opt,name=prune,proto3" json:"prune,omitempty"`
}
diff --git a/proto/repository-service.proto b/proto/repository-service.proto
index 260fc7ae1..5a6e46410 100644
--- a/proto/repository-service.proto
+++ b/proto/repository-service.proto
@@ -313,10 +313,10 @@ message MidxRepackResponse {}
message GarbageCollectRequest {
Repository repository = 1 [(target_repository)=true];
bool create_bitmap = 2;
- // If set to 'true' the 'gc' will be triggered with '--prune=24.hours.ago' flag.
- // This will remove dangling objects from the object storage that were not modified in the last 24 hours.
+ // If set to 'true' the 'gc' will be triggered with '--prune=30.minutes.ago' flag.
+ // This will remove dangling objects from the object storage that were not modified in the last 30 minutes.
// If 'false' provided the 'gc' will rely on the default expiration period (2 weeks).
- // The window of 24 hours exists because of possible concurrent operations running on the same
+ // The window of 30 minutes exists because of possible concurrent operations running on the same
// storage and removal of the objects may cause races and fail concurrent operations.
bool prune = 3;
}