-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
Codecov Report
@@ Coverage Diff @@
## master #140 +/- ##
================================================
+ Coverage 50.8692% 53.3191% +2.4499%
================================================
Files 121 121
Lines 13633 13648 +15
================================================
+ Hits 6935 7277 +342
+ Misses 5977 5644 -333
- Partials 721 727 +6 |
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
// Filename represents a binlog filename. | ||
type Filename struct { | ||
BaseName string | ||
Seq string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not float64
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we want to keep the number format like 000001
,
we can add one more float64 or int filed to keep the number value, something like space-time tradeoff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added another int64 field in d7f60d5
/run-all-tests |
pkg/binlog/filename.go
Outdated
} | ||
|
||
// GetFilenameIndex returns a float64 index value (seq number) of the filename. | ||
func GetFilenameIndex(filename string) (float64, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why float64
, not int64
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to int64
in d7f60d5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
pkg/binlog/filename.go
Outdated
|
||
// VerifyFilename verifies whether is a valid MySQL/MariaDB binlog filename. | ||
// valid format is `base + '.' + seq`. | ||
func VerifyFilename(filename string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this function return bool
type is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in d7f60d5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in d7f60d5.
pkg/streamer/reader_test.go
Outdated
c.Assert(errors.Cause(err), Equals, ErrReaderRunning) | ||
c.Assert(s, IsNil) | ||
|
||
c.Assert(ev, IsNil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about move this line after L626?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 done in d7f60d5.
@amyangfei @WangXiangUSTC PTAL again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
What problem does this PR solve?
io.EOF
returned fromBinlogParser.ParseFile
What is changed and how it works?
Check List
Tests