pump should log version info before other logs
Open
Nobody has claimed this yet.
status/help-wanted
- Dominant language
- Go
- Stars
- 291
- Forks
- 131
- Avg merge
- 5m
- Merged PRs (30d)
- 2
Description
2018/04/09 19:35:03 Connected to 10.7.104.184:2181
2018/04/09 19:35:03 Authenticated: id=144229920926728194, timeout=40000
2018/04/09 19:35:03 Re-submitting `0` credentials after reconnect
2018/04/09 19:35:03 config.go:235: [info] get kafka addrs from zookeeper: 10.7.232.216:9092,10.7.104.184:9092,10.7.113.43:9092
2018/04/09 19:35:03 Recv loop terminated: err=EOF
2018/04/09 19:35:03 Send loop terminated: err=<nil>
2018/04/09 19:35:03 version.go:18: [info] Git Commit Hash: 2a7761f992dbf13ed8ccf59ca485e9c5cb5143d6
2018/04/09 19:35:03 version.go:19: [info] Build TS: 2018-04-02 10:27:34
2018/04/09 19:35:03 version.go:20: [info] Go Version: go1.10
2018/04/09 19:35:03 version.go:21: [info] Go OS/Arch: linuxamd64
time="2018-04-09T19:35:03+08:00" level=info msg="[pd] create pd client with endpoints [http://jira-cluster-pd:2379]"
time="2018-04-09T19:35:03+08:00" level=info msg="[pd] leader switches to: http://jira-cluster-pd-f56wf.jira-cluster-pd-peer.jira-tidb.svc:2379, previous: "
time="2018-04-09T19:35:03+08:00" level=info msg="[pd] init cluster id 6537979386539282199"
2018/04/09 19:35:03 server.go:126: [info] clusterID of pump server is 6537979386539282199
2018/04/09 19:35:03 binlogger.go:80: [info] create and lock binlog file data.pump/clusters/6537979386539282199/binlog-0000000000000000-20180409193503
2018/04/09 19:35:06 server.go:451: [info] generate fake binlog successfully
pump logs kafka connection info before version info, if kafka connection failed there'll be no version info from logs which may make debug more difficult.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with version.go and trace the pump startup sequence that emits the Kafka connection logs. Reorder the startup logging so version information is emitted first, including when Kafka connection setup fails; verify the resulting log order from a pump startup run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100