diff --git a/.github/workflows/build-pure-plugin.yaml b/.github/workflows/build-pure-plugin.yaml index 761265bea8..29c2d886d9 100644 --- a/.github/workflows/build-pure-plugin.yaml +++ b/.github/workflows/build-pure-plugin.yaml @@ -62,11 +62,11 @@ jobs: # prepare windows environment # https://github.com/actions/virtual-environments/issues/2549 - - name: add mingw32 to path + - name: add mingw64 to path if: matrix.runner == 'windows-2019' shell: bash run: | - echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH + echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH - name: Set up Go ${{ matrix.go-version }} uses: actions/setup-go@v4 diff --git a/go.mod b/go.mod index ad75169e8d..b7e540d5bd 100644 --- a/go.mod +++ b/go.mod @@ -19,10 +19,9 @@ require ( github.com/elastic/beats/v7 v7.7.1 github.com/elastic/go-elasticsearch/v8 v8.6.0 github.com/elastic/go-lumber v0.1.0 - github.com/go-mysql-org/go-mysql v1.3.0 + github.com/go-mysql-org/go-mysql v1.8.0 github.com/go-ping/ping v0.0.0-20211130115550-779d1e919534 - github.com/go-sql-driver/mysql v1.6.0 - github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/go-sql-driver/mysql v1.7.1 github.com/gogo/protobuf v1.3.2 github.com/gosnmp/gosnmp v1.34.0 github.com/grafana/loki-client-go v0.0.0-20230116142646-e7494d0ef70c @@ -53,7 +52,8 @@ require ( go.opentelemetry.io/collector/consumer v0.66.0 go.opentelemetry.io/collector/pdata v0.66.0 go.opentelemetry.io/proto/otlp v0.19.0 - go.uber.org/atomic v1.10.0 + go.uber.org/atomic v1.11.0 + go.uber.org/multierr v1.11.0 golang.org/x/sys v0.17.0 google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.31.0 @@ -75,11 +75,18 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/AthenZ/athenz v1.10.39 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/ClickHouse/ch-go v0.51.2 // indirect github.com/DataDog/zstd v1.5.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/Microsoft/hcsshim v0.9.4 // indirect + github.com/VictoriaMetrics/fasthttp v1.1.0 // indirect + github.com/VictoriaMetrics/metrics v1.23.0 // indirect + github.com/VictoriaMetrics/metricsql v0.45.0 // indirect + github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect - github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/cilium/ebpf v0.7.0 // indirect @@ -121,8 +128,7 @@ require ( github.com/pelletier/go-toml v1.9.3 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect - github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect - github.com/pingcap/parser v0.0.0-20210415081931-48e7f467fd74 // indirect + github.com/pingcap/errors v0.11.5-0.20221009092201-b66cddb77c32 // indirect github.com/prometheus/client_golang v1.14.0 github.com/prometheus/prometheus v1.8.2-0.20210430082741-2a4b8e12bbf2 // indirect github.com/segmentio/asm v1.2.0 // indirect @@ -139,16 +145,12 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.opentelemetry.io/otel v1.11.2 // indirect go.opentelemetry.io/otel/trace v1.11.2 // indirect - go.uber.org/goleak v1.1.12 // indirect + go.uber.org/goleak v1.2.1 // indirect k8s.io/component-base v0.22.5 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect ) require ( - github.com/BurntSushi/toml v0.4.1 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/Microsoft/hcsshim v0.9.4 // indirect - github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 // indirect github.com/containerd/cgroups v1.0.4 // indirect github.com/containerd/containerd v1.6.8 // indirect github.com/containerd/continuity v0.2.2 // indirect @@ -162,6 +164,7 @@ require ( github.com/containers/ocicrypt v1.1.3 // indirect github.com/coreos/go-systemd/v22 v22.4.0 // indirect github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect + github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dlclark/regexp2 v1.7.0 github.com/docker/docker v20.10.23+incompatible @@ -176,6 +179,7 @@ require ( github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/googleapis v1.4.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect @@ -217,11 +221,14 @@ require ( github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/opencontainers/selinux v1.10.1 // indirect github.com/oschwald/maxminddb-golang v1.2.1 // indirect - github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7 // indirect + github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect + github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22 // indirect + github.com/pingcap/tidb/pkg/parser v0.0.0-20231103042308-035ad5ccbe67 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/richardartoul/molecule v1.0.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/siddontang/go-log v0.0.0-20180807004314-8d05993dda07 // indirect github.com/smartystreets/assertions v1.2.0 // indirect @@ -230,9 +237,10 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect go.opencensus.io v0.24.0 // indirect - go.uber.org/multierr v1.9.0 - go.uber.org/zap v1.24.0 // indirect + go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect golang.org/x/sync v0.6.0 // indirect @@ -243,7 +251,7 @@ require ( google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect gopkg.in/birkirb/loggers.v1 v1.0.3 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -259,26 +267,25 @@ require ( require ( cloud.google.com/go/compute v1.18.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/VictoriaMetrics/fasthttp v1.1.0 // indirect - github.com/VictoriaMetrics/metrics v1.23.0 // indirect - github.com/VictoriaMetrics/metricsql v0.45.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/influxdata/telegraf v1.20.0 // indirect github.com/openkruise/kruise-api v1.4.0 - github.com/richardartoul/molecule v1.0.0 // indirect github.com/valyala/fastjson v1.6.3 // indirect github.com/valyala/fastrand v1.1.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect github.com/valyala/gozstd v1.17.0 // indirect github.com/valyala/histogram v1.2.0 // indirect github.com/valyala/quicktemplate v1.7.0 // indirect - golang.org/x/mod v0.8.0 // indirect sigs.k8s.io/gateway-api v0.6.2 // indirect ) -require github.com/frankban/quicktest v1.14.5 // indirect +require ( + github.com/frankban/quicktest v1.14.5 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect +) replace ( github.com/VictoriaMetrics/VictoriaMetrics => github.com/iLogtail/VictoriaMetrics v1.83.4-ilogtail diff --git a/go.sum b/go.sum index 614c35de91..ab3f3a8643 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/ch-go v0.51.2 h1:PesdqjUImi21U61yPKsDhfer8wiQ3geTsjdjZzXd/3s= github.com/ClickHouse/ch-go v0.51.2/go.mod h1:z+/hEezvvHvRMV/I00CaXBnxOx+td4zRe7HJpBYLwGU= @@ -103,7 +103,8 @@ github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/IBM/sarama v1.42.2 h1:VoY4hVIZ+WQJ8G9KNY/SQlWguBQXQ9uvFPOnrcu8hEw= github.com/IBM/sarama v1.42.2/go.mod h1:FLPGUGwYqEs62hq2bVG6Io2+5n+pS6s/WOXVKWSLFtE= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -193,8 +194,7 @@ github.com/aws/aws-sdk-go v1.43.31 h1:yJZIr8nMV1hXjAvvOLUFqZRJcHV7udPQBfhJqawDzI github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -409,12 +409,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/cznic/golex v0.0.0-20181122101858-9c343928389c/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= +github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/cznic/parser v0.0.0-20160622100904-31edd927e5b1/go.mod h1:2B43mz36vGZNZEwkWi8ayRSSUXLfjL8OkbzwW4NcPMM= -github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= -github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= -github.com/cznic/y v0.0.0-20170802143616-045f81c6662a/go.mod h1:1rk5VM7oSnA4vjp+hrLQ3HWHa+Y4yPCa3/CsJrcNnvs= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= @@ -572,8 +568,8 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-mysql-org/go-mysql v1.3.0 h1:lpNqkwdPzIrYSZGdqt8HIgAXZaK6VxBNfr8f7Z4FgGg= -github.com/go-mysql-org/go-mysql v1.3.0/go.mod h1:3lFZKf7l95Qo70+3XB2WpiSf9wu2s3na3geLMaIIrqQ= +github.com/go-mysql-org/go-mysql v1.8.0 h1:bN+/Q5yyQXQOAabXPkI3GZX43w4Tsj2DIthjC9i6CkQ= +github.com/go-mysql-org/go-mysql v1.8.0/go.mod h1:kwbF156Z9Sy8amP3E1SZp7/s/0PuJj/xKaOWToQiq0Y= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= @@ -615,11 +611,10 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -648,6 +643,8 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= @@ -886,8 +883,6 @@ github.com/iLogtail/jfr-parser v0.6.0 h1:dNaQ0Ng2BLE5uxrhUQwtx1q7O9LIQFpMthl3SV3 github.com/iLogtail/jfr-parser v0.6.0/go.mod h1:ZMcbJjfDkOwElEK8CvUJbpetztRWRXszCmf5WU0erV8= github.com/iLogtail/metrics v1.23.0-ilogtail h1:WHhiXtMy5+HWiPpDwO7a0zkMjPd7IPa5euF07LH5h6g= github.com/iLogtail/metrics v1.23.0-ilogtail/go.mod h1:rAr/llLpEnAdTehiNlUxKgnjcOuROSzpw0GvjpEbvFc= -github.com/iLogtail/parser v0.0.0-20210415081931-48e7f467fd74-ilogtail h1:HTafOET9UvmNpjFY/Z/E1YvLFpku4HSKP9V4PrzaWwE= -github.com/iLogtail/parser v0.0.0-20210415081931-48e7f467fd74-ilogtail/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw= github.com/iLogtail/pyroscope-lib v0.35.2-ilogtail h1:n+om7Idv1ftoVOiqmL4CRWGeoj1v8TTQa7V809XiHT4= github.com/iLogtail/pyroscope-lib v0.35.2-ilogtail/go.mod h1:IpElNUA9ousagl2w05BZbzGxmd8cOERYA2vZ+DoznlQ= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= @@ -991,7 +986,6 @@ github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeY github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.3.3/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= @@ -1106,7 +1100,6 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -1302,15 +1295,16 @@ github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuM github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712 h1:R8gStypOBmpnHEx1qi//SaqxJVI4inOqljg/Aj5/390= github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pingcap/errors v0.11.5-0.20201029093017-5a7df2af2ac7/go.mod h1:G7x87le1poQzLB/TqvTJI2ILrSgobnq4Ut7luOwvfvI= -github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3/go.mod h1:G7x87le1poQzLB/TqvTJI2ILrSgobnq4Ut7luOwvfvI= -github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 h1:+FZIDR/D97YOPik4N4lPDaUcLDF/EQPogxtlHB2ZZRM= -github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pingcap/errors v0.11.5-0.20221009092201-b66cddb77c32 h1:m5ZsBa5o/0CkzZXfXLaThzKuR85SnHHetqBCpzQ30h8= +github.com/pingcap/errors v0.11.5-0.20221009092201-b66cddb77c32/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= +github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c h1:CgbKAHto5CQgWM9fSBIvaxsJHuGP0uM74HXtv3MyyGQ= +github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7 h1:k2BbABz9+TNpYRwsCCFS8pEEnFVOdbgEjL/kTlLuzZQ= -github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM= +github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22 h1:2SOzvGvE8beiC1Y4g9Onkvu6UmuBBOeWRGQEjJaT/JY= +github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= +github.com/pingcap/tidb/pkg/parser v0.0.0-20231103042308-035ad5ccbe67 h1:m0RZ583HjzG3NweDi4xAcK54NBBPJh+zXp5Fp60dHtw= +github.com/pingcap/tidb/pkg/parser v0.0.0-20231103042308-035ad5ccbe67/go.mod h1:yRkiqLFwIqibYg2P7h4bclHjHcJiIFRLKhGRyBcKYus= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1390,7 +1384,8 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/richardartoul/molecule v1.0.0 h1:+LFA9cT7fn8KF39zy4dhOnwcOwRoqKiBkPqKqya+8+U= github.com/richardartoul/molecule v1.0.0/go.mod h1:uvX/8buq8uVeiZiFht+0lqSLBHF+uGV8BrTv8W/SIwk= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1398,8 +1393,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= @@ -1421,6 +1416,7 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1659,29 +1655,30 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1726,6 +1723,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1739,7 +1738,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1756,8 +1754,8 @@ golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2103,7 +2101,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201125231158-b5590deeca9b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2119,7 +2116,6 @@ golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyj golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2329,8 +2325,9 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4 h1:hILp2hNrRnYjZpmIbx70psAHbBSEcQ1NIzDcUbJ1b6g= gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= diff --git a/licenses/LICENSE_OF_ILOGTAIL_DEPENDENCIES.md b/licenses/LICENSE_OF_ILOGTAIL_DEPENDENCIES.md index 0973d59204..9dac8a0988 100644 --- a/licenses/LICENSE_OF_ILOGTAIL_DEPENDENCIES.md +++ b/licenses/LICENSE_OF_ILOGTAIL_DEPENDENCIES.md @@ -5,6 +5,8 @@ When distributed in a binary form, iLogtail may contain portions of the followin ## Apache 2.0 licenses - [github.com/openkruise/kruise-api](https://pkg.go.dev/github.com/openkruise/kruise-api?tab=licenses) +- [github.com/pingcap/failpoint](https://pkg.go.dev/github.com/pingcap/failpoint?tab=licenses) +- [github.com/pingcap/tidb/pkg/parser](https://pkg.go.dev/github.com/pingcap/tidb/pkg/parser?tab=licenses) - [sigs.k8s.io/gateway-api](https://pkg.go.dev/sigs.k8s.io/gateway-api?tab=licenses) - [cloud.google.com/go/compute/metadata](https://pkg.go.dev/cloud.google.com/go/compute/metadata?tab=licenses) - [github.com/containerd/cgroups](https://pkg.go.dev/github.com/containerd/cgroups?tab=licenses) @@ -100,6 +102,7 @@ When distributed in a binary form, iLogtail may contain portions of the followin ## BSD licenses +- [github.com/cznic/mathutil](https://pkg.go.dev/github.com/cznic/mathutil?tab=licenses) - [github.com/klauspost/compress](https://pkg.go.dev/github.com/klauspost/compress?tab=licenses) - [github.com/danwakefield/fnmatch](https://pkg.go.dev/github.com/danwakefield/fnmatch?tab=licenses) - [github.com/denisenkom/go-mssqldb](https://pkg.go.dev/github.com/denisenkom/go-mssqldb?tab=licenses) @@ -107,6 +110,7 @@ When distributed in a binary form, iLogtail may contain portions of the followin - [github.com/knz/strtime](https://pkg.go.dev/github.com/knz/strtime?tab=licenses) - [github.com/pingcap/errors](https://pkg.go.dev/github.com/pingcap/errors?tab=licenses) - [github.com/pkg/errors](https://pkg.go.dev/github.com/pkg/errors?tab=licenses) +- [github.com/remyoudompheng/bigfft](https://pkg.go.dev/github.com/remyoudompheng/bigfft?tab=licenses) - [github.com/syndtr/goleveldb](https://pkg.go.dev/github.com/syndtr/goleveldb?tab=licenses) - [github.com/rcrowley/go-metrics](https://pkg.go.dev/github.com/rcrowley/go-metrics?tab=licenses) - [github.com/cihub/seelog](https://pkg.go.dev/github.com/cihub/seelog?tab=licenses) @@ -129,6 +133,7 @@ When distributed in a binary form, iLogtail may contain portions of the followin - [github.com/spaolacci/murmur3](https://pkg.go.dev/github.com/spaolacci/murmur3?tab=licenses) - [github.com/bits-and-blooms/bitset](https://pkg.go.dev/github.com/bits-and-blooms/bitset?tab=licenses) - [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto?tab=licenses) +- [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp?tab=licenses) - [golang.org/x/net](https://pkg.go.dev/golang.org/x/net?tab=licenses) - [golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2?tab=licenses) - [golang.org/x/sync](https://pkg.go.dev/golang.org/x/sync?tab=licenses) @@ -148,12 +153,15 @@ When distributed in a binary form, iLogtail may contain portions of the followin ## MIT licenses +- [github.com/satori/go.uuid](https://pkg.go.dev/github.com/satori/go.uuid?tab=licenses) - [github.com/valyala/gozstd](https://pkg.go.dev/github.com/valyala/gozstd?tab=licenses) +- [github.com/goccy/go-json](https://pkg.go.dev/github.com/goccy/go-json?tab=licenses) - [github.com/gofrs/uuid](https://pkg.go.dev/github.com/gofrs/uuid?tab=licenses) - [github.com/go-kit/log](https://pkg.go.dev/github.com/go-kit/log?tab=licenses) - [github.com/narqo/go-dogstatsd-parser](https://pkg.go.dev/github.com/narqo/go-dogstatsd-parser?tab=licenses) - [sigs.k8s.io/yaml](https://pkg.go.dev/sigs.k8s.io/yaml?tab=licenses) - [github.com/BurntSushi/toml](https://pkg.go.dev/github.com/BurntSushi/toml?tab=licenses) +- [github.com/Masterminds/semver](https://pkg.go.dev/github.com/Masterminds/semver?tab=licenses) - [github.com/Microsoft/go-winio](https://pkg.go.dev/github.com/Microsoft/go-winio?tab=licenses) - [github.com/Microsoft/hcsshim](https://pkg.go.dev/github.com/Microsoft/hcsshim?tab=licenses) - [github.com/IBM/sarama](https://pkg.go.dev/github.com/IBM/sarama?tab=licenses) @@ -186,7 +194,6 @@ When distributed in a binary form, iLogtail may contain portions of the followin - [github.com/mitchellh/mapstructure](https://pkg.go.dev/github.com/mitchellh/mapstructure?tab=licenses) - [github.com/paulbellamy/ratecounter](https://pkg.go.dev/github.com/paulbellamy/ratecounter?tab=licenses) - [github.com/richardartoul/molecule](https://pkg.go.dev/github.com/richardartoul/molecule?tab=licenses) -- [github.com/satori/go.uuid](https://pkg.go.dev/github.com/satori/go.uuid?tab=licenses) - [github.com/shopspring/decimal](https://pkg.go.dev/github.com/shopspring/decimal?tab=licenses) - [github.com/siddontang/go](https://pkg.go.dev/github.com/siddontang/go?tab=licenses) - [github.com/siddontang/go-log](https://pkg.go.dev/github.com/siddontang/go-log?tab=licenses) @@ -218,10 +225,8 @@ When distributed in a binary form, iLogtail may contain portions of the followin - [github.com/blang/semver](https://pkg.go.dev/github.com/blang/semver?tab=licenses) - [github.com/cilium/ebpf](https://pkg.go.dev/github.com/cilium/ebpf?tab=licenses) - [go.etcd.io/bbolt](https://pkg.go.dev/go.etcd.io/bbolt?tab=licenses) -- [github.com/benbjohnson/clock](https://pkg.go.dev/github.com/benbjohnson/clock?tab=licenses) - [github.com/ClickHouse/clickhouse-go](https://pkg.go.dev/github.com/ClickHouse/clickhouse-go?tab=licenses) - [github.com/andybalholm/brotli](https://pkg.go.dev/github.com/andybalholm/brotli?tab=licenses) -- [github.com/benbjohnson/clock](https://pkg.go.dev/github.com/benbjohnson/clock?tab=licenses) - [github.com/go-faster/city](https://pkg.go.dev/github.com/go-faster/city?tab=licenses) - [github.com/paulmach/orb](https://pkg.go.dev/github.com/paulmach/orb?tab=licenses) - [github.com/segmentio/asm](https://pkg.go.dev/github.com/segmentio/asm?tab=licenses) @@ -259,7 +264,6 @@ When distributed in a binary form, iLogtail may contain portions of the followin - [github.com/iLogtail/go-mysql fork from github.com/siddontang/go-mysql](http://github.com/iLogtail/go-mysql) based on MIT - [github.com/iLogtail/jfr-parser fork from github.com/pyroscope-io/jfr-parser](http://github.com/iLogtail/jfr-parser) based on Apache-2.0 - [github.com/iLogtail/metrics fork from github.com/VictoriaMetrics/metrics](http://github.com/iLogtail/metrics) based on MIT -- [github.com/iLogtail/parser fork from github.com/pingcap/parser](http://github.com/iLogtail/parser) based on Apache-2.0 - [github.com/iLogtail/pyroscope-lib fork from github.com/pyroscope-io/pyroscope](http://github.com/iLogtail/pyroscope-lib) based on Apache-2.0 - [github.com/iLogtail/gonvml fork from github.com/mindprince/gonvml](https://github.com/iLogtail/gonvml) based on Apache-2.0 - [github.com/iLogtail/handy fork from github.com/streadway/handy](http://github.com/iLogtail/handy) based on BSD-2-Clause diff --git a/pkg/logtail/PluginAdapter.dll b/pkg/logtail/PluginAdapter.dll index 9e34248eb7..3bc9f236b1 100644 Binary files a/pkg/logtail/PluginAdapter.dll and b/pkg/logtail/PluginAdapter.dll differ diff --git a/plugins/input/canal/input_canal.go b/plugins/input/canal/input_canal.go index 710baa345d..bffe70a305 100644 --- a/plugins/input/canal/input_canal.go +++ b/plugins/input/canal/input_canal.go @@ -66,7 +66,7 @@ func (p *LogCanal) Fire(e *canalLog.Entry) error { type CheckPoint struct { GTID string FileName string - Offset int + Offset uint32 ID int } @@ -119,7 +119,7 @@ type ServiceCanal struct { // - If any of them are invalid, plugins starts synchronization from latest (failover). StartGTID string StartBinName string - StartBinLogPos int + StartBinLogPos uint32 HeartBeatPeriod int ReadTimeout int EnableDDL bool @@ -148,11 +148,10 @@ type ServiceCanal struct { waitGroup sync.WaitGroup isGTIDEnabled bool - nextRowEventGTID string + nextRowEventGTID string // update before data is consumed config *canal.Config canal *canal.Canal - checkpoint CheckPoint - lastOffsetString string + checkpoint CheckPoint // update checkpoint after data is consumed context pipeline.Context collector pipeline.Collector lastCheckPointTime time.Time @@ -263,23 +262,18 @@ ValueLoop: sc.collector.AddData(nil, packedData) } -func (sc *ServiceCanal) OnRotate(r *replication.RotateEvent) error { +func (sc *ServiceCanal) OnRotate(_ *replication.EventHeader, r *replication.RotateEvent) error { logger.Info(sc.context.GetRuntimeContext(), "bin log file rotate", string(r.NextLogName), "pos", r.Position) sc.lastBinLogMetric.Set(string(r.NextLogName)) sc.rotateCounter.Add(1) - sc.checkpoint.FileName = string(r.NextLogName) - sc.checkpoint.Offset = int(r.Position) - sc.lastOffsetString = strconv.Itoa(int(r.Position)) - sc.saveCheckPoint() return nil } // OnDDL... -func (sc *ServiceCanal) OnDDL(pos mysql.Position, e *replication.QueryEvent) error { - // logger.Debug("on ddl event", *e) +func (sc *ServiceCanal) OnDDL(_ *replication.EventHeader, pos mysql.Position, e *replication.QueryEvent) error { + logger.Debugf(sc.context.GetRuntimeContext(), "[CANAL_DEBUG] OnDDL:%v GTID:%v Pos:%v", string(e.Query), sc.nextRowEventGTID, pos.Pos) sc.ddlCounter.Add(1) if !sc.EnableDDL { - sc.syncCheckpointWithCanal() return nil } values := map[string]string{ @@ -291,13 +285,13 @@ func (sc *ServiceCanal) OnDDL(pos mysql.Position, e *replication.QueryEvent) err "StatusVars": string(e.StatusVars), "_event_": "ddl", } + nextOffsetString := strconv.FormatUint(uint64(pos.Pos), 10) if sc.EnableGTID { values["_gtid_"] = sc.nextRowEventGTID values["_filename_"] = sc.checkpoint.FileName - values["_offset_"] = sc.lastOffsetString + values["_offset_"] = nextOffsetString } sc.addData(values) - sc.syncCheckpointWithCanal() return nil } @@ -349,13 +343,14 @@ func (sc *ServiceCanal) columnValueToString(column *schema.TableColumn, rowVal i // OnRow processes the row event, according user's config, constructs data to send. func (sc *ServiceCanal) OnRow(e *canal.RowsEvent) error { - // logger.Debug("OnRow", *e, "GTID", sc.nextRowEventGTID) + logger.Debug(sc.context.GetRuntimeContext(), "[CANAL_DEBUG] host", sc.Host, "db", e.Table.Schema, "table", e.Table.Name, "action", e.Action, "GTID", sc.nextRowEventGTID) sc.rowCounter.Add(1) values := map[string]string{"_host_": sc.Host, "_db_": e.Table.Schema, "_table_": e.Table.Name, "_event_": "row_" + e.Action, "_id_": strconv.Itoa(sc.checkpoint.ID)} + nextOffsetString := strconv.FormatUint(uint64(e.Header.LogPos), 10) if sc.EnableGTID { values["_gtid_"] = sc.nextRowEventGTID values["_filename_"] = sc.checkpoint.FileName - values["_offset_"] = sc.lastOffsetString + values["_offset_"] = nextOffsetString } if sc.EnableEventMeta && e.Header != nil { values["_event_time_"] = strconv.Itoa(int(e.Header.Timestamp)) @@ -365,12 +360,10 @@ func (sc *ServiceCanal) OnRow(e *canal.RowsEvent) error { } if e.Action == canal.UpdateAction { if !sc.EnableUpdate { - sc.syncCheckpointWithCanal() return nil } if len(e.Rows)%2 != 0 { logger.Error(sc.context.GetRuntimeContext(), "CANAL_INVALID_ALARM", "invalid update value count", len(e.Rows)) - sc.syncCheckpointWithCanal() return nil } for i := 0; i < len(e.Rows); i += 2 { @@ -421,12 +414,10 @@ func (sc *ServiceCanal) OnRow(e *canal.RowsEvent) error { } else { if e.Action == canal.DeleteAction { if !sc.EnableDelete { - sc.syncCheckpointWithCanal() return nil } } else { if !sc.EnableInsert { - sc.syncCheckpointWithCanal() return nil } } @@ -461,13 +452,23 @@ func (sc *ServiceCanal) OnRow(e *canal.RowsEvent) error { } // Update checkpoint. - sc.syncCheckpointWithCanal() sc.checkpoint.ID++ return nil } -func (sc *ServiceCanal) OnXID(p mysql.Position) error { - // logger.Debug("OnXID", p) +/* + What is an XID_EVENT? + An XID_EVENT marks the end of a transaction that has been committed. It signifies that the transaction has been fully completed and can be safely replicated to a slave server. When a transaction is committed in a MySQL server, an XID_EVENT is written to the binlog to signify that the commit operation has been successfully completed. + + When will an XID_EVENT be triggered? + An XID_EVENT is triggered and written to the binlog in the following scenarios: + + Commit of a Transaction: When a transaction is committed in InnoDB or another transactional storage engine, an XID_EVENT is written to the binlog. This happens at the end of the transaction, indicating that all changes within that transaction are now complete and consistent. + + Replication: During replication, the slave server reads the XID_EVENT to understand that a transaction has been committed on the master. This helps in maintaining transactional consistency between the master and the slave. +*/ +func (sc *ServiceCanal) OnXID(_ *replication.EventHeader, p mysql.Position) error { + logger.Debugf(sc.context.GetRuntimeContext(), "[CANAL_DEBUG] OnXID Pos:%v", p.String()) sc.xgidCounter.Add(1) return nil } @@ -480,30 +481,41 @@ func (sc *ServiceCanal) OnXID(p mysql.Position) error { // calls to OnRow will be filtered. So, if plugin restarts before the next // OnRow call comes, it will rerun from a old checkpoint. // But this should be trivial for cases that valid data comes continuously. -func (sc *ServiceCanal) OnGTID(s mysql.GTIDSet) error { - // logger.Debug("OnGTID", s) +func (sc *ServiceCanal) OnGTID(_ *replication.EventHeader, e mysql.BinlogGTIDEvent) error { sc.xgidCounter.Add(1) + s, err := e.GTIDNext() + if err != nil { + return err + } + logger.Debugf(sc.context.GetRuntimeContext(), "[CANAL_DEBUG] OnGTID: %v", s.String()) sc.nextRowEventGTID = s.String() return nil } -func (sc *ServiceCanal) OnPosSynced(pos mysql.Position, _ mysql.GTIDSet, force bool) error { - // logger.Debug("OnPosSynced", pos, force) +// OnPosSynced is called right after RotateEvent, XIDEvent and DDLEvent +// If our handle do not return err, we do not need to save checkpoint in those handlers +func (sc *ServiceCanal) OnPosSynced(_ *replication.EventHeader, pos mysql.Position, gset mysql.GTIDSet, force bool) error { + logger.Debugf(sc.context.GetRuntimeContext(), "[CANAL_DEBUG] OnPosSynced: %v", gset.String()) sc.syncCounter.Add(1) sc.checkpoint.FileName = pos.Name - sc.checkpoint.Offset = int(pos.Pos) - sc.lastOffsetString = strconv.Itoa(int(pos.Pos)) + sc.checkpoint.Offset = pos.Pos + if sc.checkpoint.GTID != "" { + sc.checkpoint.GTID = gset.String() + } nowTime := time.Now() // save checkpoint 3 second per time if nowTime.Sub(sc.lastCheckPointTime) > time.Duration(3)*time.Second || - (force && nowTime.Sub(sc.lastCheckPointTime) > time.Duration(1)*time.Second) { - sc.lastCheckPointTime = nowTime + force { sc.saveCheckPoint() } return nil } -func (sc *ServiceCanal) OnTableChanged(schema string, table string) error { +func (sc *ServiceCanal) OnRowsQueryEvent(_ *replication.RowsQueryEvent) error { + return nil +} + +func (sc *ServiceCanal) OnTableChanged(_ *replication.EventHeader, _ string, _ string) error { return nil } @@ -527,16 +539,10 @@ func (sc *ServiceCanal) initCheckPoint() { func (sc *ServiceCanal) saveCheckPoint() { sc.checkpointCounter.Add(1) + sc.lastCheckPointTime = time.Now() _ = sc.context.SaveCheckPointObject("mysql_canal", &sc.checkpoint) } -func (sc *ServiceCanal) syncCheckpointWithCanal() { - gset := sc.canal.SyncedGTIDSet() - if gset != nil { - sc.checkpoint.GTID = gset.String() - } -} - // Collect takes in an accumulator and adds the metrics that the Input // gathers. This is called every "interval" func (sc *ServiceCanal) Collect(pipeline.Collector) error { @@ -547,6 +553,10 @@ func (sc *ServiceCanal) runCanal(pos mysql.Position) { logger.Infof(sc.context.GetRuntimeContext(), "start canal from %v with binlog-file mode", pos) sc.canal.SetEventHandler(sc) sc.lastBinLogMetric.Set(pos.String()) + sc.checkpoint.FileName = pos.Name + sc.checkpoint.Offset = pos.Pos + sc.checkpoint.GTID = "" + sc.saveCheckPoint() sc.lastErrorChan <- sc.canal.RunFrom(pos) } @@ -554,7 +564,11 @@ func (sc *ServiceCanal) runCanalByGTID(gtid mysql.GTIDSet) { logger.Infof(sc.context.GetRuntimeContext(), "start canal from %v with GTID mode", gtid) sc.canal.SetEventHandler(sc) sc.lastGTIDMetric.Set(gtid.String()) + var pos mysql.Position + sc.checkpoint.FileName = pos.Name + sc.checkpoint.Offset = pos.Pos sc.checkpoint.GTID = gtid.String() + sc.saveCheckPoint() sc.lastErrorChan <- sc.canal.StartFromGTID(gtid) } @@ -572,9 +586,9 @@ func (sc *ServiceCanal) GetBinlogLatestPos() mysql.Position { } else { logger.Error(sc.context.GetRuntimeContext(), "CANAL_INVALID_ALARM", "show binary logs error") } - offset, conErr := strconv.Atoi(fmt.Sprint(value[1])) + offset, conErr := strconv.ParseUint(fmt.Sprint(value[1]), 10, 64) if conErr == nil { - latestPos.Pos = (uint32)(offset) + latestPos.Pos = uint32(offset) } } } @@ -590,7 +604,7 @@ func (sc *ServiceCanal) GetBinlogLatestPos() mysql.Position { // used to indicate if the error is caused by network, so that caller can know // when to retry (for temporary network problem). func (sc *ServiceCanal) getGTIDMode() (bool, bool, error) { - statement := "show global variables like 'gtid_mode'" + statement := "select @@global.gtid_mode" result, err := sc.canal.Execute(statement) if err != nil { return false, true, fmt.Errorf( @@ -601,13 +615,13 @@ func (sc *ServiceCanal) getGTIDMode() (bool, bool, error) { return false, false, nil } value := result.Values[len(result.Values)-1] - if len(value) != 2 { - return false, false, fmt.Errorf("The number of columns (%v) is not 2 for %v", + if len(value) != 1 { + return false, false, fmt.Errorf("The number of columns (%v) is not 1 for %v", len(value), statement) } - gtidModeVal, err := mysqlValueToString(value[1]) + gtidModeVal, err := mysqlValueToString(value[0]) if err != nil { - return false, false, fmt.Errorf("Invaild GTID mode value,error: %v", err) + return false, false, fmt.Errorf("Invaild GTID mode value, error: %v", err) } if "on" == strings.ToLower(gtidModeVal) { return true, false, nil @@ -617,7 +631,8 @@ func (sc *ServiceCanal) getGTIDMode() (bool, bool, error) { // getLatestGTID gets the latest GTID from server. func (sc *ServiceCanal) getLatestGTID() (mysql.GTIDSet, error) { - statement := "show global variables like 'gtid_executed'" + // do not use "show global variables like 'gtid_executed'" as it truncates gtid to 1024 bytes + statement := "select @@global.gtid_executed" result, err := sc.canal.Execute(statement) if err != nil { return nil, fmt.Errorf("Execute statement %v failed during getLatestGTID, error: %v", @@ -627,11 +642,11 @@ func (sc *ServiceCanal) getLatestGTID() (mysql.GTIDSet, error) { return nil, fmt.Errorf("Empty result: statement (%v)", statement) } value := result.Values[len(result.Values)-1] - if len(value) != 2 { - return nil, fmt.Errorf("The number of columns (%v) is not 2 for %v", len(value), statement) + if len(value) != 1 { + return nil, fmt.Errorf("The number of columns (%v) is not 1 for %v", len(value), statement) } - gtidVal, err := mysqlValueToString(value[1]) + gtidVal, err := mysqlValueToString(value[0]) if err != nil { return nil, fmt.Errorf("Invaild GTID value, error: %v", err) } @@ -716,7 +731,6 @@ func (sc *ServiceCanal) Start(c pipeline.Collector) error { sc.initCheckPoint() if !sc.isGTIDEnabled && sc.checkpoint.GTID != "" { sc.checkpoint.GTID = "" - sc.saveCheckPoint() } logger.Infof(sc.context.GetRuntimeContext(), "Checkpoint initialized: %v", sc.checkpoint) @@ -733,12 +747,11 @@ func (sc *ServiceCanal) Start(c pipeline.Collector) error { sc.checkpoint.GTID, err) gtid = nil sc.checkpoint.GTID = "" - sc.saveCheckPoint() } } if nil == gtid && sc.checkpoint.FileName != "" { startPos.Name = sc.checkpoint.FileName - startPos.Pos = uint32(sc.checkpoint.Offset) + startPos.Pos = sc.checkpoint.Offset } if nil == gtid && 0 == len(startPos.Name) && !sc.StartFromBegining { gtid, err = sc.getLatestGTID() @@ -746,7 +759,7 @@ func (sc *ServiceCanal) Start(c pipeline.Collector) error { logger.Warning(sc.context.GetRuntimeContext(), "CANAL_START_ALARM", "Call getLatestGTID failed, error", err) startPos = sc.GetBinlogLatestPos() } - logger.Infof(sc.context.GetRuntimeContext(), "Get latest checkpoint", gtid, startPos) + logger.Infof(sc.context.GetRuntimeContext(), "Get latest checkpoint GTID: %v Position: %v", gtid, startPos) } if gtid != nil { @@ -759,15 +772,13 @@ ForBlock: for { select { case <-sc.shutdown: + sc.canal.Close() // will trigger OnPosSynced with force=true logger.Info(sc.context.GetRuntimeContext(), "service_canal quit because of shutting down, checkpoint", sc.checkpoint) - sc.canal.Close() <-sc.lastErrorChan - sc.saveCheckPoint() return nil case err = <-sc.lastErrorChan: - sc.canal.Close() - sc.saveCheckPoint() + sc.canal.Close() // will trigger OnPosSynced with force=true if nil == err { logger.Info(sc.context.GetRuntimeContext(), "Canal returns normally, break loop") diff --git a/scripts/plugin_build.sh b/scripts/plugin_build.sh index 61f03a14d9..10d9bcb74e 100755 --- a/scripts/plugin_build.sh +++ b/scripts/plugin_build.sh @@ -49,7 +49,7 @@ if [ $OS_FLAG = 1 ]; then NAME=libPluginBase.so fi elif [ $OS_FLAG = 3 ]; then - export GOARCH=386 + # export GOARCH=386 export CGO_ENABLED=1 if [ $BUILDMODE = "c-shared" ]; then NAME=PluginBase.dll diff --git a/test/case/behavior/input_mssql/Dockerfile b/test/case/behavior/input_mssql/Dockerfile index 2d73bd5f2e..8082761451 100644 --- a/test/case/behavior/input_mssql/Dockerfile +++ b/test/case/behavior/input_mssql/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM mcr.microsoft.com/mssql/server:2022-latest +FROM mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04 USER root # Create app directory diff --git a/test/case/behavior/input_mssql/docker-compose.yaml b/test/case/behavior/input_mssql/docker-compose.yaml index af2c3ca116..c31b9cf2b2 100644 --- a/test/case/behavior/input_mssql/docker-compose.yaml +++ b/test/case/behavior/input_mssql/docker-compose.yaml @@ -16,7 +16,7 @@ version: '3.8' services: mssql: - image: mcr.microsoft.com/mssql/server:2022-latest + image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04 hostname: mssql ports: - "1433:1433"