Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ TiCDC can be built on the following operating systems:
* Linux
* MacOS

Install GoLang 1.25.5
Install GoLang 1.25.6

```bash
# Linux
wget https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz
wget https://go.dev/dl/go1.25.6.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.25.6.linux-amd64.tar.gz

# MacOS
curl -O https://go.dev/dl/go1.25.5.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.25.5.darwin-amd64.tar.gz
curl -O https://go.dev/dl/go1.25.6.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.25.6.darwin-amd64.tar.gz


export PATH=$PATH:/usr/local/go/bin
Expand Down
6 changes: 3 additions & 3 deletions cmd/storage-consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/pingcap/ticdc/pkg/sink/codec/common"
"github.com/pingcap/ticdc/pkg/sink/codec/csv"
putil "github.com/pingcap/ticdc/pkg/util"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/objstore/storeapi"
"go.uber.org/atomic"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
Expand All @@ -60,7 +60,7 @@ type indexRange struct {
type consumer struct {
replicationCfg *config.ReplicaConfig
codecCfg *common.Config
externalStorage storage.ExternalStorage
externalStorage storeapi.Storage
fileExtension string
sink sink.Sink
// tableDMLIdxMap maintains a map of <dmlPathKey, fileIndexKeyMap>
Expand Down Expand Up @@ -195,7 +195,7 @@ func (c *consumer) getNewFiles(
ctx context.Context,
) (map[cloudstorage.DmlPathKey]fileIndexRange, error) {
tableDMLMap := make(map[cloudstorage.DmlPathKey]fileIndexRange)
opt := &storage.WalkOption{SubDir: ""}
opt := &storeapi.WalkOption{SubDir: ""}

origDMLIdxMap := make(map[cloudstorage.DmlPathKey]fileIndexKeyMap, len(c.tableDMLIdxMap))
for k, v := range c.tableDMLIdxMap {
Expand Down
1 change: 1 addition & 0 deletions coordinator/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (m *mockPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesClient
}

type mockGCStatesClient struct {
pdgc.GCStatesClient
keyspaceID uint32

mu sync.Mutex
Expand Down
1 change: 1 addition & 0 deletions coordinator/ensure_gc_cleanup_async_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (c *blockingPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesCli
}

type blockingGCStatesClient struct {
pdgc.GCStatesClient
parent *blockingPdClient
}

Expand Down
2 changes: 2 additions & 0 deletions coordinator/gccleaner/cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (c *errorPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesClient
}

type errorGCStatesClient struct {
pdgc.GCStatesClient
err error
}

Expand Down Expand Up @@ -71,6 +72,7 @@ func (c *countingPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesCli
}

type countingGCStatesClient struct {
pdgc.GCStatesClient
parent *countingPdClient
}

Expand Down
2 changes: 1 addition & 1 deletion deployments/integration-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN ./download-integration-test-binaries.sh $BRANCH $COMMUNITY $VERSION $OS $ARC
RUN ls ./bin

# Download go into /usr/local dir.
ENV GOLANG_VERSION 1.25.5
ENV GOLANG_VERSION 1.25.6
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion deployments/next-gen-local-integration-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WORKDIR /root/download
#RUN ls ./bin

# Download go into /usr/local dir.
ENV GOLANG_VERSION 1.25.5
ENV GOLANG_VERSION 1.25.6
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
Expand Down
4 changes: 2 additions & 2 deletions downstreamadapter/sink/cloudstorage/dml_writers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/pingcap/ticdc/pkg/sink/cloudstorage"
"github.com/pingcap/ticdc/pkg/sink/codec/common"
"github.com/pingcap/ticdc/utils/chann"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/objstore/storeapi"
"golang.org/x/sync/errgroup"
)

Expand All @@ -50,7 +50,7 @@ type dmlWriters struct {

func newDMLWriters(
changefeedID commonType.ChangeFeedID,
storage storage.ExternalStorage,
storage storeapi.Storage,
config *cloudstorage.Config,
encoderConfig *common.Config,
extension string,
Expand Down
4 changes: 2 additions & 2 deletions downstreamadapter/sink/cloudstorage/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/pingcap/ticdc/pkg/metrics"
"github.com/pingcap/ticdc/pkg/sink/cloudstorage"
putil "github.com/pingcap/ticdc/pkg/util"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/meta/model"
"github.com/pingcap/tidb/pkg/objstore/storeapi"
"github.com/robfig/cron"
"go.uber.org/atomic"
"go.uber.org/zap"
Expand All @@ -49,7 +49,7 @@ type sink struct {
sinkURI *url.URL
// todo: this field is not take effects yet, should be fixed.
outputRawChangeEvent bool
storage storage.ExternalStorage
storage storeapi.Storage

dmlWriters *dmlWriters

Expand Down
8 changes: 4 additions & 4 deletions downstreamadapter/sink/cloudstorage/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/pingcap/ticdc/pkg/sink/cloudstorage"
"github.com/pingcap/ticdc/pkg/sink/codec/common"
"github.com/pingcap/ticdc/utils/chann"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/objstore/storeapi"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
Expand All @@ -42,7 +42,7 @@ type writer struct {
// worker id
id int
changeFeedID commonType.ChangeFeedID
storage storage.ExternalStorage
storage storeapi.Storage
config *cloudstorage.Config
// toBeFlushedCh contains a set of batchedTask waiting to be flushed to cloud storage.
toBeFlushedCh chan batchedTask
Expand All @@ -60,7 +60,7 @@ type writer struct {
func newWriter(
id int,
changefeedID commonType.ChangeFeedID,
storage storage.ExternalStorage,
storage storeapi.Storage,
config *cloudstorage.Config,
extension string,
inputCh *chann.DrainableChann[eventFragment],
Expand Down Expand Up @@ -236,7 +236,7 @@ func (d *writer) writeDataFile(ctx context.Context, dataFilePath, indexFilePath
return rowsCnt, bytesCnt, d.storage.WriteFile(ctx, dataFilePath, buf.Bytes())
}

writer, inErr := d.storage.Create(ctx, dataFilePath, &storage.WriterOption{
writer, inErr := d.storage.Create(ctx, dataFilePath, &storeapi.WriterOption{
Concurrency: d.config.FlushConcurrency,
})
if inErr != nil {
Expand Down
11 changes: 6 additions & 5 deletions downstreamadapter/sink/redo/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import (
misc "github.com/pingcap/ticdc/pkg/redo/common"
"github.com/pingcap/ticdc/pkg/util"
"github.com/pingcap/ticdc/pkg/uuid"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/objstore"
"github.com/pingcap/tidb/pkg/objstore/storeapi"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/atomic"
"go.uber.org/zap"
Expand All @@ -48,7 +49,7 @@ type RedoMeta struct {

// This fields are used to process meta files and perform
// garbage collection of logs.
extStorage storage.ExternalStorage
extStorage storeapi.Storage
uuidGenerator uuid.Generator
preMetaFile string

Expand Down Expand Up @@ -94,15 +95,15 @@ func (m *RedoMeta) Running() bool {
}

func (m *RedoMeta) PreStart(ctx context.Context) error {
uri, err := storage.ParseRawURL(util.GetOrZero(m.cfg.Storage))
uri, err := objstore.ParseRawURL(util.GetOrZero(m.cfg.Storage))
if err != nil {
return err
}
// "nfs" and "local" scheme are converted to "file" scheme
redo.FixLocalScheme(uri)
// blackhole scheme is converted to "noop" scheme here, so we can use blackhole for testing
if redo.IsBlackholeStorage(uri.Scheme) {
uri, _ = storage.ParseRawURL("noop://")
uri, _ = objstore.ParseRawURL("noop://")
}

extStorage, err := redo.InitExternalStorage(ctx, *uri)
Expand Down Expand Up @@ -315,7 +316,7 @@ func (m *RedoMeta) deleteAllLogs(ctx context.Context) error {
// otherwise it should have already meet panic during changefeed running time.
// the extStorage may be nil in the unit test, so just set the external storage to make unit test happy.
if m.extStorage == nil {
uri, err := storage.ParseRawURL(util.GetOrZero(m.cfg.Storage))
uri, err := objstore.ParseRawURL(util.GetOrZero(m.cfg.Storage))
redo.FixLocalScheme(uri)
if err != nil {
return err
Expand Down
Loading