Thrift
  1. Thrift
  2. THRIFT-1531

Framed transport does not work with binary protocol in some case

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We are seeing that in some case if you use framed transport and binary protocol, the parameter passed to the server side will be corrupted.
      https://issues.apache.org/jira/browse/HBASE-5507

      It can be reproduced by the unit test added in
      https://issues.apache.org/jira/browse/HBASE-5506

      Our server is a java server.

        Activity

        Hide
        dhruba borthakur added a comment -

        also, is it true that if you use compact=true, then the problem does not occur?

        Show
        dhruba borthakur added a comment - also, is it true that if you use compact=true, then the problem does not occur?
        Hide
        Scott Chen added a comment -

        Yes, if we use framed and compact the problem no loner occur.

        Show
        Scott Chen added a comment - Yes, if we use framed and compact the problem no loner occur.
        Hide
        Bryan Duxbury added a comment -

        I had a cursory look at the patch on HBASE-5506. Is there any chance you're using the .array() method of the binary argument without regard for .arrayOffset(), .position(), or .length()? This would lead to you seeing the entire Thrift message that was sent, including frame size and message header.

        Show
        Bryan Duxbury added a comment - I had a cursory look at the patch on HBASE-5506 . Is there any chance you're using the .array() method of the binary argument without regard for .arrayOffset(), .position(), or .length()? This would lead to you seeing the entire Thrift message that was sent, including frame size and message header.
        Hide
        Scott Chen added a comment -

        Bryan: Thanks! I think that may be possible. I will check.

        Show
        Scott Chen added a comment - Bryan: Thanks! I think that may be possible. I will check.
        Hide
        Scott Chen added a comment -

        Bryan: You are right! That's exactly the reason. Thanks!
        https://reviews.facebook.net/D2073

        Show
        Scott Chen added a comment - Bryan: You are right! That's exactly the reason. Thanks! https://reviews.facebook.net/D2073

          People

          • Assignee:
            Bryan Duxbury
            Reporter:
            Scott Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development