diff options
author | John Cai <jcai@gitlab.com> | 2019-07-09 02:46:03 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2019-07-09 02:55:45 +0300 |
commit | 1a0108300b1eb948b293c8279c7f6e2df2922d42 (patch) | |
tree | b201a2252242073415e0fd4c145c604d76b70e0d | |
parent | 46856e1fd24d25f22289beefa472736aadc38652 (diff) |
Remove catfile cache feature flag
-rw-r--r-- | changelogs/unreleased/jc-remove-catfile-feature-flag.yml | 5 | ||||
-rw-r--r-- | internal/git/catfile/catfile.go | 10 | ||||
-rw-r--r-- | internal/service/commit/find_commit_test.go | 3 |
3 files changed, 6 insertions, 12 deletions
diff --git a/changelogs/unreleased/jc-remove-catfile-feature-flag.yml b/changelogs/unreleased/jc-remove-catfile-feature-flag.yml new file mode 100644 index 000000000..a2cc5da6a --- /dev/null +++ b/changelogs/unreleased/jc-remove-catfile-feature-flag.yml @@ -0,0 +1,5 @@ +--- +title: Remove catfile cache feature flag +merge_request: 1357 +author: +type: other diff --git a/internal/git/catfile/catfile.go b/internal/git/catfile/catfile.go index 288470170..4f462d19b 100644 --- a/internal/git/catfile/catfile.go +++ b/internal/git/catfile/catfile.go @@ -9,7 +9,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/alternates" "gitlab.com/gitlab-org/gitaly/internal/metadata" - "gitlab.com/gitlab-org/gitaly/internal/metadata/featureflag" ) var catfileCacheCounter = prometheus.NewCounterVec( @@ -34,12 +33,6 @@ var totalCatfileProcesses = prometheus.NewCounter( }, ) -const ( - // CacheFeatureFlagKey is the feature flag key for catfile batch caching. This should match - // what is in gitlab-ce - CacheFeatureFlagKey = "catfile-cache" -) - func init() { prometheus.MustRegister(catfileCacheCounter) prometheus.MustRegister(currentCatfileProcesses) @@ -134,8 +127,7 @@ func New(ctx context.Context, repo *gitalypb.Repository) (*Batch, error) { } sessionID := metadata.GetValue(ctx, "gitaly-session-id") - - if featureflag.IsDisabled(ctx, CacheFeatureFlagKey) || sessionID == "" { + if sessionID == "" { return newBatch(ctx, repoPath, env) } diff --git a/internal/service/commit/find_commit_test.go b/internal/service/commit/find_commit_test.go index ab64427c7..7be44bc00 100644 --- a/internal/service/commit/find_commit_test.go +++ b/internal/service/commit/find_commit_test.go @@ -14,7 +14,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -332,7 +331,6 @@ func benchmarkFindCommit(withCache bool, b *testing.B) { revision := revisions[b.N%len(revisions)] if withCache { md := metadata.New(map[string]string{ - featureflag.HeaderKey(catfile.CacheFeatureFlagKey): "true", "gitaly-session-id": "abc123", }) @@ -378,7 +376,6 @@ func TestFindCommitWithCache(t *testing.T) { for i := 0; i < 10; i++ { revision := revisions[i%len(revisions)] md := metadata.New(map[string]string{ - featureflag.HeaderKey(catfile.CacheFeatureFlagKey): "true", "gitaly-session-id": "abc123", }) |