From ed4bb282f67bba48e1d2a52a4e8ed0aa5afc9636 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Tue, 30 Aug 2022 14:03:44 -0600 Subject: [PATCH] Rename config param to max_outstanding_catchup Signed-off-by: Ivan Kozlovic --- server/jetstream_cluster_test.go | 10 +++++----- server/opts.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/jetstream_cluster_test.go b/server/jetstream_cluster_test.go index 9b156f6a..2fbfa212 100644 --- a/server/jetstream_cluster_test.go +++ b/server/jetstream_cluster_test.go @@ -13067,7 +13067,7 @@ func TestJetStreamClusterReplicasChangeStreamInfo(t *testing.T) { checkStreamInfo(js) } -func TestJetStreamClusterMaxCatchup(t *testing.T) { +func TestJetStreamClusterMaxOutstandingCatchup(t *testing.T) { c := createJetStreamClusterExplicit(t, "MCB", 3) defer c.shutdown() @@ -13076,7 +13076,7 @@ func TestJetStreamClusterMaxCatchup(t *testing.T) { v := s.gcbOutMax s.gcbMu.RUnlock() if v != defaultMaxTotalCatchupOutBytes { - t.Fatalf("Server %v, expected max catchup to be %v, got %v", s, defaultMaxTotalCatchupOutBytes, v) + t.Fatalf("Server %v, expected max_outstanding_catchup to be %v, got %v", s, defaultMaxTotalCatchupOutBytes, v) } } @@ -13085,7 +13085,7 @@ func TestJetStreamClusterMaxCatchup(t *testing.T) { tmpl := ` listen: 127.0.0.1:-1 server_name: %s - jetstream: { max_catchup: 1KB, domain: ngs, max_mem_store: 256MB, max_file_store: 2GB, store_dir: '%s'} + jetstream: { max_outstanding_catchup: 1KB, domain: ngs, max_mem_store: 256MB, max_file_store: 2GB, store_dir: '%s'} leaf: { listen: 127.0.0.1:-1 } cluster { name: %s @@ -13101,7 +13101,7 @@ func TestJetStreamClusterMaxCatchup(t *testing.T) { v := s.gcbOutMax s.gcbMu.RUnlock() if v != 1024 { - t.Fatalf("Server %v, expected max catchup to be 1KB, got %v", s, v) + t.Fatalf("Server %v, expected max_outstanding_catchup to be 1KB, got %v", s, v) } } @@ -13149,7 +13149,7 @@ func TestJetStreamClusterMaxCatchup(t *testing.T) { content, err := os.ReadFile(cfile) require_NoError(t, err) conf := string(content) - conf = strings.ReplaceAll(conf, "max_catchup: 1KB,", "max_catchup: 1MB,") + conf = strings.ReplaceAll(conf, "max_outstanding_catchup: 1KB,", "max_outstanding_catchup: 1MB,") err = os.WriteFile(cfile, []byte(conf), 0644) require_NoError(t, err) err = s.Reload() diff --git a/server/opts.go b/server/opts.go index 5f340713..d2cf0fc3 100644 --- a/server/opts.go +++ b/server/opts.go @@ -1949,7 +1949,7 @@ func parseJetStream(v interface{}, opts *Options, errors *[]error, warnings *[]e } case "unique_tag": opts.JetStreamUniqueTag = strings.ToLower(strings.TrimSpace(mv.(string))) - case "max_catchup", "max_catchup_bytes", "max_total_catchup_bytes": + case "max_outstanding_catchup": s, err := getStorageSize(mv) if err != nil { return &configErr{tk, fmt.Sprintf("%s %s", strings.ToLower(mk), err)}