Skip to content
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

TCompactProtocol protocol id violation #19

Open
jspofford opened this issue Jul 3, 2018 · 1 comment
Open

TCompactProtocol protocol id violation #19

jspofford opened this issue Jul 3, 2018 · 1 comment

Comments

@jspofford
Copy link

I was seeing a protocol id exception using TCompactProtocol with some complicated unit tests (multiple clients threads, complex thrift structures, variety of interactions). I fixed this issue by replacing "injected" with an integer level that follows structure nesting:
jspofford@e3b54db#diff-7571f63b5051b15d8bf04742cfc4e517

I would have submitted a pull request but had trouble reproducing in your simplified unit tests. I'd need to dig further to isolate how the stream position is being upset. You may want to include this change anyway simply to ensure that the span data is sent in the last field stop instead of the first one, assuming you want to measure until the end of the incoming data serialization instead of just the first structure.

Unit tests pass with this change.

@malafeev
Copy link

malafeev commented Jul 4, 2018

the reason why injected was added is to avoid multiple injections of span context in case of complex data structure.
@jspofford does level prevent it? Could you create PR (to avoid manual copy paste from you code)?
It would be great to have tests for your case (no rush :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants