samuel / go-thrift

A native Thrift package for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scribed is unable to talk to go thrift server

micmac opened this issue · comments

Prefixing method names with "Thrift." causes Scribed to get confused and unable to talk to the Go Thrift server. I modified server.go so that it removes the prefix from the response and it works now but I don't know enough about Thrift to tell whether this is a good solution.

I'm surprised that a client checks the method name in the response, but that seems like a reasonable fix. It's an unfortunate side affect of using net/rpc since it requires a service name prefixed to the method name (hence the "Thrift.").

If you have a patch for this I would love to get it merged. Thanks

Unfortunately I can't come up with a proper solution right now and the quick fix to just remove any Thrift. prefix could break more things than it fixes. I'll try it again when I have more time.

Not terribly ideal.. but the ServerCodec now stores the incoming method name (referenced by sequence ID) before mangling so that it can be returned in the response.

Wow you're fast, thank you.