-
Notifications
You must be signed in to change notification settings - Fork 127
Update go-git and go-mysql-server dependencies #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update go-git and go-mysql-server dependencies #430
Conversation
packfiles.go
Outdated
@@ -193,7 +200,7 @@ func getUnpackedObject(repo repository, hash plumbing.Hash) (o object.Object, er | |||
type repoObjectDecoder struct { | |||
repo string | |||
packfile plumbing.Hash | |||
decoder *packfile.Decoder | |||
decoder *packfile.Packfile |
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.
should we rename decoder
to packfile
then?
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.
... and remove/rename packfile plumbing.Hash
?
5b51805
to
98342bf
Compare
packfiles.go
Outdated
@@ -193,7 +200,7 @@ func getUnpackedObject(repo repository, hash plumbing.Hash) (o object.Object, er | |||
type repoObjectDecoder struct { | |||
repo string | |||
packfile plumbing.Hash | |||
decoder *packfile.Decoder | |||
decoder *packfile.Packfile |
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.
... and remove/rename packfile plumbing.Hash
?
proto.RegisterType((*Bit)(nil), "internal.Bit") | ||
} | ||
if t := proto.MessageType("internal.ColumnAttrSet"); t == nil { | ||
proto.RegisterType((*ColumnAttrSet)(nil), "internal.ColumnAttrSet") |
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.
good to keep these extra ifs. it avoids printing warning about already registered type, on start.
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.
Vendor files should not be modified manually
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.
We'll have to find a better way for these autogenerated files, but so far I modified them adding extra ifs to avoid nasty warnings (after integrating pilosalib driver - both try to register the same types in protobuf)
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.
Actually, I didn't have protobuf errors on startup anymore. Some dependency must be updated.
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.
@ajnavarro - do you have pilosa running? Right now, if pilosa is not running we don't register old driver. The warnings appeared when we registered both drivers, because pilosa
and go-pilosa
register in protobuf the same types.
@erizocosmico - I totally agree, but it was just ad-hoc fix to suppress ugly warnings. It was temporary, the quickest fix.
Moreover based on comments in protobufs:
https://github.com/golang/protobuf/blob/master/proto/properties.go#L481
Some day duplicate proto type register may panic.
Hmm, I think CI is failing because now the objects are iterated in another order. Can that be the cause @erizocosmico @jfontan ? WDYT? |
@ajnavarro it can be that, the errors in travis are not very descriptive, though, so no way to be certain. |
I'm taking a look on test errors. |
The problem was the order of the objects returned by the iterator. Sent a PR changing the iterator back to offset order. |
Some refactor was needed to be able to use the new packfile decoder API from go-git. Speed performance on full scans and generating indexes of 40%-60%, depending of the dataset. Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
98342bf
to
de986e5
Compare
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
Some refactoring was needed to be able to use the new packfile decoder API from go-git.
Speed performance on full scans and generating indexes of 40%-60%, depending on the dataset.
Signed-off-by: Antonio Jesus Navarro Perez antnavper@gmail.com