Hello Mingmin Liu, There is at least one other case for skip.
3. new server sees data from old client and old client is still transmitting a field which has been deleted in new server IDL. Also I would note that Apache Thrift 0.7.0 is several years old, the current release is 0.9.2 and many improvements and subtle changes have taken place since 0.7.0. Best, Randy On Mon, Jan 12, 2015 at 12:55 AM, Mingmin Liu <[email protected]> wrote: > I am using thrift 0.7.0 on my server, and recently find sometimes my server > busy calling TProtocolUtil.skip(). > > stack trace: > > "New I/O worker #75" daemon prio=10 tid=0x00007f7804892000 > nid=0x51601 runnable [0x00007f76129e7000] > java.lang.Thread.State: RUNNABLE > at org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:122) > at org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:60) > at com.My_Thrift_Object.read(My_Thrift_Object.java:958) > at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:69) > > this happens when I try to deserialize the binary content from client. > > Is it true that TProtocolUtil .skip() will be called only when > My_Thrift_Object see some field that it doesn't know ? > > if yes, when will this happen? > > I can come up with 2 conditions: > > 1. old server see data from new client and the new client has defined some > new field in thrift. > 2. the binary content is corrupted or someone maliciously build up it. > > is my understanding right?
