transporter
transporter copied to clipboard
Don't do unnecessary index iteration
Can cause an underlying panic in mgo, and does not seem to serve any purpose.
Connects to https://github.com/compose/transporter/issues/478
Required for all PRs:
- [ ] CHANGELOG.md updated (feel free to wait until changes have been reviewed by a maintainer)
- [ ] README.md updated (if needed)
Codecov Report
Merging #479 into master will increase coverage by
0.41%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #479 +/- ##
==========================================
+ Coverage 85.92% 86.34% +0.41%
==========================================
Files 61 61
Lines 3587 3580 -7
==========================================
+ Hits 3082 3091 +9
+ Misses 334 320 -14
+ Partials 171 169 -2
Impacted Files | Coverage Δ | |
---|---|---|
adaptor/mongodb/reader.go | 86% <100%> (+0.97%) |
:arrow_up: |
adaptor/postgres/tailer.go | 79.32% <0%> (-2.8%) |
:arrow_down: |
pipeline/node.go | 88.46% <0%> (+0.51%) |
:arrow_up: |
adaptor/elasticsearch/clients/v5/writer.go | 88.65% <0%> (+8.24%) |
:arrow_up: |
adaptor/elasticsearch/clients/v2/writer.go | 86.07% <0%> (+10.12%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9e154e7...a9ceeb5. Read the comment docs.
Just to provide some context as to why panics happen here.
https://github.com/go-mgo/mgo/blob/v2/session.go#L1535-L1558
The logic here doesn't account for 64-bit numbers which can be added via https://docs.mongodb.com/manual/core/shell-types/#numberlong