From fd4f20b700f4264fca7ee65c623b222356db85f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E5=BD=AA?= Date: Wed, 30 Oct 2024 18:11:31 +0800 Subject: [PATCH] =?UTF-8?q?Resolve=20"1.60.0=20=E5=87=A0=E4=B8=AA=E5=B7=B2?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/installer/installer/upgrade.go | 5 +++++ cmd/installer/installer/upgrade_test.go | 15 +++++++++++++++ cmd/make/build/build.go | 2 +- internal/io/dataway/flush.go | 4 ++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/cmd/installer/installer/upgrade.go b/cmd/installer/installer/upgrade.go index 0824ec4ad8..25ca18bb87 100644 --- a/cmd/installer/installer/upgrade.go +++ b/cmd/installer/installer/upgrade.go @@ -54,6 +54,11 @@ func Upgrade() error { } func upgradeMainConfig(c *config.Config) *config.Config { + if c.PointPool != nil { + l.Infof("default enable point pool") + c.PointPool.Enable = true // default enable point-pool + } + // setup dataway if c.Dataway != nil { c.Dataway.DeprecatedURL = "" diff --git a/cmd/installer/installer/upgrade_test.go b/cmd/installer/installer/upgrade_test.go index de918fa4d0..1d37289d2e 100644 --- a/cmd/installer/installer/upgrade_test.go +++ b/cmd/installer/installer/upgrade_test.go @@ -296,6 +296,21 @@ func TestUpgradeMainConfig(t *T.T) { return c }(), }, + + { + name: "default-enable-point-pool", + old: func() *config.Config { + c := config.DefaultConfig() + c.PointPool.Enable = false + + return c + }(), + + expect: func() *config.Config { + c := config.DefaultConfig() + return c + }(), + }, } for _, tc := range cases { diff --git a/cmd/make/build/build.go b/cmd/make/build/build.go index c9fa142583..06ee32489b 100644 --- a/cmd/make/build/build.go +++ b/cmd/make/build/build.go @@ -235,7 +235,7 @@ func Compile() error { } if err := compileAPMInject(goos, goarch, BuildDir); err != nil { - return err + l.Warnf("build APM inject failed: %s, ignored", err) } upgraderDir := fmt.Sprintf("%s/%s-%s-%s", BuildDir, upgrader.BuildBinName, goos, goarch) diff --git a/internal/io/dataway/flush.go b/internal/io/dataway/flush.go index 0b24162d07..b04d52c7dc 100644 --- a/internal/io/dataway/flush.go +++ b/internal/io/dataway/flush.go @@ -160,6 +160,10 @@ func (dw *Dataway) doFlush(w *writer, b *body, opts ...WriteOption) error { } isGzip := "F" + if w.cacheClean { + isGzip = "T" // fail-cache always gzipped before HTTP POST + } + if dw.GZip && !w.cacheClean { // under cacheClean, all body has been gzipped during previous POST var ( zstart = time.Now()