Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1531

Framed transport does not work with binary protocol in some case

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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 dhruba borthakur added a comment -

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

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

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

        Show
        schen Scott Chen added a comment - Yes, if we use framed and compact the problem no loner occur.
        Hide
        bryanduxbury 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
        bryanduxbury 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
        schen Scott Chen added a comment -

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

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

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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development