pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
426 stars 283 forks source link

Protobuf registration conflicts in the CanalProtocol.proto and EntryProtocol.proto #1071

Open hzj629206 opened 3 years ago

hzj629206 commented 3 years ago

Bug Report

Both proto/canal/CanalProtocol.pb.go and proto/canal/EntryProtocol.pb.go defined HEARTBEAT. They have the same package name com_alibaba_otter_canal_protocol.

In the github.com/golang/protobuf v1.4.2 this is causing warning: file EntryProtocol.proto has a package name conflict over com.alibaba.otter.canal.protocol.HEARTBEAT

// google.golang.org/protobuf/reflect/protoregistry/registry.go:31
var ignoreConflict = func(d protoreflect.Descriptor, err error) bool {
    log.Printf(""+
        "WARNING: %v\n"+
        "A future release will panic on registration conflicts. See:\n"+
        "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict\n"+
        "\n", err)
    return true
}

ticdc version: master

amyangfei commented 3 years ago

Does this warning happens during generating .go files from proto file or running program with generated .go files