[
https://issues.apache.org/jira/browse/THRIFT-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14533856#comment-14533856
]
James E. King, III commented on THRIFT-2353:
--------------------------------------------
What are the implications of backwards compatibility if we change
TSimpleFileTransport to use _O_BINARY mode? For Windows folks who use it, this
change could break their I/O. Is the file itself versioned such that we could
read the version and decide if we should switch to binary mode? If not, is
there a way to add a version that will not break older code if written from
newer code? I agree with the notion that "make cross" should exercise
TFileTransport.
> Unexpected 'No more data to read.' when using TCompactProtocolT
> ---------------------------------------------------------------
>
> Key: THRIFT-2353
> URL: https://issues.apache.org/jira/browse/THRIFT-2353
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.1
> Environment: Windows/Visual Studio 2010
> Reporter: Dan Small
> Attachments: sample.zip
>
>
> Below is my .idl
> I filled in a ConnectorConfig with a couple of 'xmlFiles' and
> 'delimitedFiles' each of which had several 'properties'.
> I was writing to a file using TSimpleFileTransport and TCompactProtocolT.
> When I tried to read what had been written I would get the 'No more data to
> read.' error. If I switched to using TBinaryProtocol then the problem would
> go away and everything seemed to function correctly.
> The same problem does not happen with Java.
> I tried applying the patch for issue 1833 however that didn't fix the problem.
> union PropertyLocation
> {
> 1 : i64 column
> 2 : string xpath
> }
> struct DocumentProperty
> {
> 1 : i64 datatype,
> 2 : bool dateIsUTC,
> 3 : string id,
> 4 : string displayName,
> 5 : string description,
> 6 : string dateStringFormat,
> 7 : PropertyLocation location;
> }
> struct DelimitedFormat
> {
> 1 : i32 columnDelimiter
> 2 : i32 listDelimiter
> 3 : i32 quote
> 4 : bool firstRowIsHeader
> }
> struct XMLFormat
> {
> 1 : list< string > namespaces
> }
> union FormatDetail
> {
> 1 : DelimitedFormat delimitedFormat
> 2 : XMLFormat xmlFormat
> }
> struct DocumentFormat
> {
> 1 : string id,
> 2 : string displayName,
> 3 : string description,
> 4 : list< DocumentProperty > properties;
> 5 : FormatDetail detail;
> }
> struct ConnectorConfig
> {
> 1 : i64 logRetentionDays
> 2 : i64 logLevel
> 3 : i64 logMaxFileSize
> 4 : list< DocumentFormat > xmlFiles
> 5 : list< DocumentFormat > delimitedFiles
> 6 : string logLocation
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)