Skip to content

Commit 5dd2f6c

Browse files
committed
wip: dont use is_importing for push limit
1 parent 153a3b1 commit 5dd2f6c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/spokes/spokes.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,7 @@ func (r *spokesReceivePack) isFsckConfigEnabled() bool {
955955
}
956956

957957
func (r *spokesReceivePack) getMaxInputSize() (int, error) {
958-
// We want to skip the default push limit when the `import_skip_push_limit`
959-
// stat is set only.
960-
// We keep using the `is_import` here for backward compatibility only,
961-
// which should be removed on a subsequent PR.
962-
if isImporting() || shouldSkipPushLimit() {
958+
if skipPushLimit() {
963959
return 80 * 1024 * 1024 * 1024, nil /* 80 GB */
964960
}
965961

@@ -1238,7 +1234,7 @@ func isImporting() bool {
12381234
return sockstat.GetBool("is_importing")
12391235
}
12401236

1241-
func shouldSkipPushLimit() bool {
1237+
func skipPushLimit() bool {
12421238
return sockstat.GetBool("import_skip_push_limit")
12431239
}
12441240

0 commit comments

Comments
 (0)