[jira] [Commented] (THRIFT-3859) Unix Domain Socket Support in Objective-C

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949888#comment-15949888
 ] 

ASF GitHub Bot commented on THRIFT-3859:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1031
  
Hi @clindsay just checking in to see if you had made any progress on adding 
cross test support for cocoa.   If not that's okay... it would be really nice 
to have it though.


> Unix Domain Socket Support in Objective-C
> -
>
> Key: THRIFT-3859
> URL: https://issues.apache.org/jira/browse/THRIFT-3859
> Project: Thrift
>  Issue Type: Improvement
>  Components: Cocoa - Library
>Affects Versions: 0.10.0
>Reporter: Chris Vasselli
>Priority: Minor
>
> I would like to be able to use Unix Domain Sockets as the transport to 
> communicate between different processes on a single machine. There seems to 
> be support in the C++ and Python libraries (the two other languages used in 
> my project), but no support in Objective-C.
> Proposed server interface:
> {{TSocketServer *server = [[TSocketServer alloc] 
> initWithPath:@"/path/to/pipe" protocolFactory:protocolFactory 
> processorFactory:processorFactory];}}
> Proposed client interface:
> {{TSocketTransport *socket = [[TSocketTransport alloc] 
> initWithPath:@"/path/to/pipe"];}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1031: THRIFT-3859: Unix Domain Socket Support in Objective-C

2017-03-30 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1031
  
Hi @clindsay just checking in to see if you had made any progress on adding 
cross test support for cocoa.   If not that's okay... it would be really nice 
to have it though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (THRIFT-4147) Rust: protocol should accept transports with non-static lifetime

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4147.

   Resolution: Fixed
 Assignee: James E. King, III
Fix Version/s: 0.11.0

Committed - thanks!

> Rust: protocol should accept transports with non-static lifetime
> 
>
> Key: THRIFT-4147
> URL: https://issues.apache.org/jira/browse/THRIFT-4147
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Affects Versions: 1.0
>Reporter: Chao Sun
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> Currently for Rust language support, all protocols only accept 
> {{TTransport}}s with static lifetime. For instance:
> {code}
> impl TCompactInputProtocol {
> /// Create a `TCompactInputProtocol` that reads bytes from `transport`.
> pub fn new(transport: Rc>) -> 
> TCompactInputProtocol {
> TCompactInputProtocol {
> last_read_field_id: 0,
> read_field_id_stack: Vec::new(),
> pending_read_bool_value: None,
> transport: transport,
> }
> }
>...
> {code}
> This poses an issue when user has the following custom defined TTransport:
> {code}
> // A read buffer piggy-backed on T: Read. Write is not supported.
> pub struct ReadBuffer<'a, T> where T: 'a + Read {
>   data: &'a mut T
> }
> impl<'a, T: 'a + Read> ReadBuffer<'a, T> {
>   pub fn new(data: &'a mut T) -> Self { Self { data: data } }
> }
> impl<'a, T: 'a + Read> Read for ReadBuffer<'a, T> {
>   fn read( self, buf:  [u8]) -> io::Result {
> let bytes_read = self.data.read(buf)?;
> Ok(bytes_read)
>   }
> }
> ...
> {code}
> It's better to change the protocols to accept {{Rc>>}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4147) Rust: protocol should accept transports with non-static lifetime

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949880#comment-15949880
 ] 

ASF GitHub Bot commented on THRIFT-4147:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1226


> Rust: protocol should accept transports with non-static lifetime
> 
>
> Key: THRIFT-4147
> URL: https://issues.apache.org/jira/browse/THRIFT-4147
> Project: Thrift
>  Issue Type: Bug
>  Components: Rust - Library
>Affects Versions: 1.0
>Reporter: Chao Sun
> Fix For: 0.11.0
>
>
> Currently for Rust language support, all protocols only accept 
> {{TTransport}}s with static lifetime. For instance:
> {code}
> impl TCompactInputProtocol {
> /// Create a `TCompactInputProtocol` that reads bytes from `transport`.
> pub fn new(transport: Rc>) -> 
> TCompactInputProtocol {
> TCompactInputProtocol {
> last_read_field_id: 0,
> read_field_id_stack: Vec::new(),
> pending_read_bool_value: None,
> transport: transport,
> }
> }
>...
> {code}
> This poses an issue when user has the following custom defined TTransport:
> {code}
> // A read buffer piggy-backed on T: Read. Write is not supported.
> pub struct ReadBuffer<'a, T> where T: 'a + Read {
>   data: &'a mut T
> }
> impl<'a, T: 'a + Read> ReadBuffer<'a, T> {
>   pub fn new(data: &'a mut T) -> Self { Self { data: data } }
> }
> impl<'a, T: 'a + Read> Read for ReadBuffer<'a, T> {
>   fn read( self, buf:  [u8]) -> io::Result {
> let bytes_read = self.data.read(buf)?;
> Ok(bytes_read)
>   }
> }
> ...
> {code}
> It's better to change the protocols to accept {{Rc>>}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1226: THRIFT-4147: Rust: protocol should accept transpo...

2017-03-30 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1226


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (THRIFT-4113) Provide a buffer transport for reading/writing in memory byte stream

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4113.

   Resolution: Fixed
 Assignee: James E. King, III
Fix Version/s: 0.11.0

Committed - thanks.

> Provide a buffer transport for reading/writing in memory byte stream
> 
>
> Key: THRIFT-4113
> URL: https://issues.apache.org/jira/browse/THRIFT-4113
> Project: Thrift
>  Issue Type: New Feature
>  Components: Rust - Library
>Reporter: Chao Sun
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> Currently the Rust support doesn't seem to have the ability to take a input 
> byte stream and deserialize it with a particular protocol. The same for the 
> write path. [TBufferTransport | 
> https://github.com/apache/thrift/blob/master/lib/rs/src/transport/mem.rs#L42] 
> seems to be the closest one but it is not exposed. Also, it copies the data 
> to a intermediate buffer, which could be costly when deserializing large byte 
> streams.
> We should implement something similar to CPP's [TMemoryBuffer | 
> https://github.com/apache/thrift/blob/master/lib/rs/src/transport/mem.rs#L42] 
> which provides 3 flavors of how the input buffer can be treated. IMO We can 
> start by modifying TBufferTransport and make it public.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1218: export thrift::mem::TBufferTransport

2017-03-30 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1218


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (THRIFT-4069) All perl packages should have proper namespace, version syntax, and use proper thrift exceptions

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III updated THRIFT-4069:
---
Component/s: Perl - Compiler

> All perl packages should have proper namespace, version syntax, and use 
> proper thrift exceptions
> 
>
> Key: THRIFT-4069
> URL: https://issues.apache.org/jira/browse/THRIFT-4069
> Project: Thrift
>  Issue Type: Improvement
>  Components: Perl - Compiler, Perl - Library
>Affects Versions: 0.10.0
> Environment: Perl
>Reporter: James E. King, III
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> Currently our perl package module files contain multiple packages.  We should 
> break each package out to an individual file (or at least make sure 
> everything is in the Thrift namespace) and properly version it.  Package 
> versioning was introduced in Perl 5.10 so:
> 1. Update the minimum required perl to 5.10.  This is based on 
> http://search.cpan.org/~jpeacock/version-0.9917/lib/version.pod indicating 
> that perl version object was added to perl in 5.10.
> 2. For each package use the {{perl MODULE VERSION}} perlmod syntax, where 
> VERSION is {{v0.11.0}}.  This is based on 
> http://perldoc.perl.org/functions/package.html.
> 3. Each module not under the Thrift namespace must be moved there 
> (TApplicationException, TMessageType, TType).  This will be a breaking 
> change, but necessary for proper packaging of the library.
> Currently if you inspect the Perl PAUSE version metadata for Thrift's 
> sub-modules only the 0.9.0 modules from gslin have version identities.
> For example if you look at Thrift and Thrift::BinaryProtocol in the CPAN list 
> of packages at http://www.cpan.org/modules/02packages.details.txt you will 
> see:
> {noformat}
> Thrift 0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> Thrift::BinaryProtocol 0.009000  G/GS/GSLIN/Thrift-0.9.0.tar.gz
> {noformat}
> There are some anomalies, for example packages defined in Thrift.pm come out 
> at the top level namespace like:
> {noformat}
> TApplicationException  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TMessageType   0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TType  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> {noformat}
> So technically if you do 'install TApplicationException' I would expect you 
> might get thrift.  This is wrong and should be fixed.  TApplicationException 
> needs to be inside Thrift, not at the top level.
> Also we should pull in relevant changes from the patch in THRIFT-4059 around 
> improving packaging.
> Also we should actually use TProtocolException and TTransportException 
> instead of just TException everywhere.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4069) All perl packages should have proper namespace, version syntax, and use proper thrift exceptions

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949836#comment-15949836
 ] 

ASF GitHub Bot commented on THRIFT-4069:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1220


> All perl packages should have proper namespace, version syntax, and use 
> proper thrift exceptions
> 
>
> Key: THRIFT-4069
> URL: https://issues.apache.org/jira/browse/THRIFT-4069
> Project: Thrift
>  Issue Type: Improvement
>  Components: Perl - Compiler, Perl - Library
>Affects Versions: 0.10.0
> Environment: Perl
>Reporter: James E. King, III
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> Currently our perl package module files contain multiple packages.  We should 
> break each package out to an individual file (or at least make sure 
> everything is in the Thrift namespace) and properly version it.  Package 
> versioning was introduced in Perl 5.10 so:
> 1. Update the minimum required perl to 5.10.  This is based on 
> http://search.cpan.org/~jpeacock/version-0.9917/lib/version.pod indicating 
> that perl version object was added to perl in 5.10.
> 2. For each package use the {{perl MODULE VERSION}} perlmod syntax, where 
> VERSION is {{v0.11.0}}.  This is based on 
> http://perldoc.perl.org/functions/package.html.
> 3. Each module not under the Thrift namespace must be moved there 
> (TApplicationException, TMessageType, TType).  This will be a breaking 
> change, but necessary for proper packaging of the library.
> Currently if you inspect the Perl PAUSE version metadata for Thrift's 
> sub-modules only the 0.9.0 modules from gslin have version identities.
> For example if you look at Thrift and Thrift::BinaryProtocol in the CPAN list 
> of packages at http://www.cpan.org/modules/02packages.details.txt you will 
> see:
> {noformat}
> Thrift 0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> Thrift::BinaryProtocol 0.009000  G/GS/GSLIN/Thrift-0.9.0.tar.gz
> {noformat}
> There are some anomalies, for example packages defined in Thrift.pm come out 
> at the top level namespace like:
> {noformat}
> TApplicationException  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TMessageType   0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TType  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> {noformat}
> So technically if you do 'install TApplicationException' I would expect you 
> might get thrift.  This is wrong and should be fixed.  TApplicationException 
> needs to be inside Thrift, not at the top level.
> Also we should pull in relevant changes from the patch in THRIFT-4059 around 
> improving packaging.
> Also we should actually use TProtocolException and TTransportException 
> instead of just TException everywhere.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (THRIFT-4069) All perl packages should have proper namespace, version syntax, and use proper thrift exceptions

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4069.

   Resolution: Fixed
Fix Version/s: 0.11.0

> All perl packages should have proper namespace, version syntax, and use 
> proper thrift exceptions
> 
>
> Key: THRIFT-4069
> URL: https://issues.apache.org/jira/browse/THRIFT-4069
> Project: Thrift
>  Issue Type: Improvement
>  Components: Perl - Compiler, Perl - Library
>Affects Versions: 0.10.0
> Environment: Perl
>Reporter: James E. King, III
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> Currently our perl package module files contain multiple packages.  We should 
> break each package out to an individual file (or at least make sure 
> everything is in the Thrift namespace) and properly version it.  Package 
> versioning was introduced in Perl 5.10 so:
> 1. Update the minimum required perl to 5.10.  This is based on 
> http://search.cpan.org/~jpeacock/version-0.9917/lib/version.pod indicating 
> that perl version object was added to perl in 5.10.
> 2. For each package use the {{perl MODULE VERSION}} perlmod syntax, where 
> VERSION is {{v0.11.0}}.  This is based on 
> http://perldoc.perl.org/functions/package.html.
> 3. Each module not under the Thrift namespace must be moved there 
> (TApplicationException, TMessageType, TType).  This will be a breaking 
> change, but necessary for proper packaging of the library.
> Currently if you inspect the Perl PAUSE version metadata for Thrift's 
> sub-modules only the 0.9.0 modules from gslin have version identities.
> For example if you look at Thrift and Thrift::BinaryProtocol in the CPAN list 
> of packages at http://www.cpan.org/modules/02packages.details.txt you will 
> see:
> {noformat}
> Thrift 0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> Thrift::BinaryProtocol 0.009000  G/GS/GSLIN/Thrift-0.9.0.tar.gz
> {noformat}
> There are some anomalies, for example packages defined in Thrift.pm come out 
> at the top level namespace like:
> {noformat}
> TApplicationException  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TMessageType   0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> TType  0.01  
> J/JK/JKING/thrift/Thrift-0.10.0.tar.gz
> {noformat}
> So technically if you do 'install TApplicationException' I would expect you 
> might get thrift.  This is wrong and should be fixed.  TApplicationException 
> needs to be inside Thrift, not at the top level.
> Also we should pull in relevant changes from the patch in THRIFT-4059 around 
> improving packaging.
> Also we should actually use TProtocolException and TTransportException 
> instead of just TException everywhere.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1220: THRIFT-4069: perl library cleanup - namespaces, v...

2017-03-30 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1220


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1218: export thrift::mem::TBufferTransport

2017-03-30 Thread sunchao
Github user sunchao commented on the issue:

https://github.com/apache/thrift/pull/1218
  
This change looks good to me, even though I'm also relatively new to Rust.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1218: export thrift::mem::TBufferTransport

2017-03-30 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1218
  
Please rebase against upstream/master and force push to kick a new build.  
I'd like to see CI pass (or get much closer) before merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1217: TSocket: Don't close connections when failing to read/wr...

2017-03-30 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1217
  
Please rebase against upstream/master and force push to kick a new build.  
I'd like to see CI pass (or get much closer) before merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1216: TNonblockingServer: Fix using uninitialized event_

2017-03-30 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1216
  
Please rebase against upstream/master and force push to kick a new build.  
I'd like to see CI pass (or get much closer) before merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1211: Fix use closed(freed) connections

2017-03-30 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1211
  
Please rebase this branch against upstream/master and force push to kick 
off a new build.  I would like to see the CI build pass (or get much closer 
than it is now) before merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-4126) Validate objects in php extension

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949774#comment-15949774
 ] 

ASF GitHub Bot commented on THRIFT-4126:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1215


> Validate objects in php extension
> -
>
> Key: THRIFT-4126
> URL: https://issues.apache.org/jira/browse/THRIFT-4126
> Project: Thrift
>  Issue Type: Improvement
>  Components: PHP - Compiler, PHP - Library
>Reporter: Myroslav Kosinskyi
>Assignee: Myroslav Kosinskyi
>Priority: Minor
> Fix For: 0.11.0
>
>
> Now there is  not validation if required fields are set when we use php 
> extension to serialize and deserialize thrift objects.
> So i have implemented this feature
> And i am going to create a pull request soon



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (THRIFT-4126) Validate objects in php extension

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4126.

   Resolution: Fixed
Fix Version/s: 0.11.0

Committed - thanks!

> Validate objects in php extension
> -
>
> Key: THRIFT-4126
> URL: https://issues.apache.org/jira/browse/THRIFT-4126
> Project: Thrift
>  Issue Type: Improvement
>  Components: PHP - Compiler, PHP - Library
>Reporter: Myroslav Kosinskyi
>Assignee: Myroslav Kosinskyi
>Priority: Minor
> Fix For: 0.11.0
>
>
> Now there is  not validation if required fields are set when we use php 
> extension to serialize and deserialize thrift objects.
> So i have implemented this feature
> And i am going to create a pull request soon



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1215: Thrift 4126

2017-03-30 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1215


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Assigned] (THRIFT-4142) Add a functional test to check proper handling of required fields in structures

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III reassigned THRIFT-4142:
--

Assignee: James E. King, III

> Add a functional test to check proper handling of required fields in 
> structures
> ---
>
> Key: THRIFT-4142
> URL: https://issues.apache.org/jira/browse/THRIFT-4142
> Project: Thrift
>  Issue Type: Improvement
>  Components: Test Suite
>Affects Versions: 0.10.0
> Environment: Docker builds (ubuntu is okay)
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
>
> During code review of THRIFT-4126 an additional functional test was discussed 
> that would be useful to ensure all runtimes behave the same way with respect 
> to required fields.  THRIFT-4126 changes the php runtime to throw an protocol 
> exception when a required field is not set in serialization or 
> deserialization.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4151) Thrift Mutex Contention Profiling (pthreads) should be disabled by default

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949684#comment-15949684
 ] 

ASF GitHub Bot commented on THRIFT-4151:


GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1229

THRIFT-4151: disable pthread concurrency analysis code in standard builds



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-4151

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1229.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1229


commit de46b4b4b23f52b7c1c9dc3eacdc56e79d4beedf
Author: James E. King, III 
Date:   2017-03-30T19:47:02Z

THRIFT-4151: disable pthread concurrency analysis code in standard builds




> Thrift Mutex Contention Profiling (pthreads) should be disabled by default
> --
>
> Key: THRIFT-4151
> URL: https://issues.apache.org/jira/browse/THRIFT-4151
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: pthreads
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
>
> The default behavior for the concurrency::Mutex class (pthread 
> implementation) is to track concurrency profiling and report to a callback 
> routine every so often.  Given this is in a critical performance section of 
> code I would recommend that the default should be to keep this code disabled, 
> and folks can enable it if they want to for their distribution.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1229: THRIFT-4151: disable pthread concurrency analysis...

2017-03-30 Thread jeking3
GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1229

THRIFT-4151: disable pthread concurrency analysis code in standard builds



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-4151

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1229.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1229


commit de46b4b4b23f52b7c1c9dc3eacdc56e79d4beedf
Author: James E. King, III 
Date:   2017-03-30T19:47:02Z

THRIFT-4151: disable pthread concurrency analysis code in standard builds




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Assigned] (THRIFT-4151) Thrift Mutex Contention Profiling (pthreads) should be disabled by default

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III reassigned THRIFT-4151:
--

Assignee: James E. King, III

> Thrift Mutex Contention Profiling (pthreads) should be disabled by default
> --
>
> Key: THRIFT-4151
> URL: https://issues.apache.org/jira/browse/THRIFT-4151
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: pthreads
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
>
> The default behavior for the concurrency::Mutex class (pthread 
> implementation) is to track concurrency profiling and report to a callback 
> routine every so often.  Given this is in a critical performance section of 
> code I would recommend that the default should be to keep this code disabled, 
> and folks can enable it if they want to for their distribution.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-3978) Thrift C++ runtime uses assert to prevent overflows, checks sanity only in debug builds

2017-03-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949667#comment-15949667
 ] 

ASF GitHub Bot commented on THRIFT-3978:


GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1228

THRIFT-3978: tighten up pthread mutex implementation, removing asserts and 
replacing them with exceptions



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-3978-mutex

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1228.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1228


commit 8323899a347a316b59443e1dd88ef0a7d1529748
Author: James E. King, III 
Date:   2017-03-30T19:30:03Z

THRIFT-3978: tighten up pthread mutex implementation, removing asserts and 
replacing them with exceptions




> Thrift C++ runtime uses assert to prevent overflows, checks sanity only in 
> debug builds
> ---
>
> Key: THRIFT-3978
> URL: https://issues.apache.org/jira/browse/THRIFT-3978
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: All
>Reporter: James E. King, III
>Assignee: James E. King, III
>  Labels: security
>
> Currently there is widespread use of assert in the thrift C++ runtime 
> library.  Some of the more disturbing cases are security related, for example 
> checking header sizes.  I recommend we eliminate assertions that are only 
> checked in debug mode, and instead throw the appropriate exception, usually a 
> TTransportException with CORRUPTED_DATA as the reason.  If we're going to 
> check for an overflow or a buffer overrun, we should do so in debug and 
> release modes.  Further, assertions are not easily tested whereas exceptions 
> are.
> In THRIFT-3873 apache::thrift::transport::safe_numeric_cast was added, so I 
> also suggest changing static_cast to safe_numeric_cast where appropriate 
> throughout the transport code to catch any overflow errors.
> Another location where assert is used liberally is inside the posix Mutex 
> implementation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift pull request #1228: THRIFT-3978: tighten up pthread mutex implementat...

2017-03-30 Thread jeking3
GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1228

THRIFT-3978: tighten up pthread mutex implementation, removing asserts and 
replacing them with exceptions



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-3978-mutex

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1228.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1228


commit 8323899a347a316b59443e1dd88ef0a7d1529748
Author: James E. King, III 
Date:   2017-03-30T19:30:03Z

THRIFT-3978: tighten up pthread mutex implementation, removing asserts and 
replacing them with exceptions




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1215: Thrift 4126

2017-03-30 Thread kufd
Github user kufd commented on the issue:

https://github.com/apache/thrift/pull/1215
  
There is a falg "validate" in thrift generator for php (validate:
Generate PHP validator methods\n")
 And that flag is used in my changes
I will try  to add tests for both cases: when the flag is set and when not


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (THRIFT-4151) Thrift Mutex Contention Profiling (pthreads) should be disabled by default

2017-03-30 Thread James E. King, III (JIRA)
James E. King, III created THRIFT-4151:
--

 Summary: Thrift Mutex Contention Profiling (pthreads) should be 
disabled by default
 Key: THRIFT-4151
 URL: https://issues.apache.org/jira/browse/THRIFT-4151
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.10.0
 Environment: pthreads
Reporter: James E. King, III
Priority: Minor


The default behavior for the concurrency::Mutex class (pthread implementation) 
is to track concurrency profiling and report to a callback routine every so 
often.  Given this is in a critical performance section of code I would 
recommend that the default should be to keep this code disabled, and folks can 
enable it if they want to for their distribution.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (THRIFT-4150) Python server or cpp client do not handle an unimplemented service method gracefully

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III updated THRIFT-4150:
---
Summary: Python server or cpp client do not handle an unimplemented service 
method gracefully  (was: Python server or cpp client do not handle the 
unimplemented method gracefully)

> Python server or cpp client do not handle an unimplemented service method 
> gracefully
> 
>
> Key: THRIFT-4150
> URL: https://issues.apache.org/jira/browse/THRIFT-4150
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler, C++ - Library, Python - Compiler, Python 
> - Library
>Affects Versions: 0.10.0
> Environment: Ubuntu Docker
>Reporter: James E. King, III
>Priority: Minor
>
> I added a new method to the ThriftTest service and I implemented the server 
> and client in C++.  In the C++ client I added exception handling to catch 
> TProtocolException and std::exception.  I expected that when TestClient sent 
> in a method that the server had not implemented, a 
> TProtocolException(NOT_IMPLEMENTED) would be returned.  The server log 
> indicates it got to this point in theory:
> {noformat}
> ERROR:root:'TestHandler' object has no attribute 'testRequired'
> Traceback (most recent call last):
>   File 
> "/home/jking/thrift/github/thrift/test/py/gen-py/ThriftTest/ThriftTest.py", 
> line 1593, in process_testRequired
> self._handler.testRequired(args.req)
> {noformat}
> However on the C++ client side, a std::exception was received and NOT a 
> TProtocolException, which is a bug:
> {noformat}
> testClient.testRequired() =>*** FAILED *** got back std::exception Internal 
> error
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (THRIFT-4150) Python server or cpp client do not handle the unimplemented method gracefully

2017-03-30 Thread James E. King, III (JIRA)
James E. King, III created THRIFT-4150:
--

 Summary: Python server or cpp client do not handle the 
unimplemented method gracefully
 Key: THRIFT-4150
 URL: https://issues.apache.org/jira/browse/THRIFT-4150
 Project: Thrift
  Issue Type: Bug
  Components: C++ - Compiler, C++ - Library, Python - Compiler, Python 
- Library
Affects Versions: 0.10.0
 Environment: Ubuntu Docker
Reporter: James E. King, III
Priority: Minor


I added a new method to the ThriftTest service and I implemented the server and 
client in C++.  In the C++ client I added exception handling to catch 
TProtocolException and std::exception.  I expected that when TestClient sent in 
a method that the server had not implemented, a 
TProtocolException(NOT_IMPLEMENTED) would be returned.  The server log 
indicates it got to this point in theory:
{noformat}
ERROR:root:'TestHandler' object has no attribute 'testRequired'
Traceback (most recent call last):
  File 
"/home/jking/thrift/github/thrift/test/py/gen-py/ThriftTest/ThriftTest.py", 
line 1593, in process_testRequired
self._handler.testRequired(args.req)
{noformat}

However on the C++ client side, a std::exception was received and NOT a 
TProtocolException, which is a bug:

{noformat}
testClient.testRequired() =>*** FAILED *** got back std::exception Internal 
error
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (THRIFT-455) Compiler flag to make optional/required field modifiers compulsory

2017-03-30 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III updated THRIFT-455:
--
  Priority: Minor  (was: Major)
Issue Type: Epic  (was: New Feature)

> Compiler flag to make optional/required field modifiers compulsory
> --
>
> Key: THRIFT-455
> URL: https://issues.apache.org/jira/browse/THRIFT-455
> Project: Thrift
>  Issue Type: Epic
>  Components: Compiler (General)
>Reporter: Bryan Duxbury
>Priority: Minor
>
> if we are unwilling to globally require users specify "required" or 
> "optional" when creating their structs, I think we should at least add a 
> command line switch that causes us to enforce that behavior. It would 
> certainly make my implementations more reliable, especially when I'm giving 
> non-experts the tools to make their own IDLs.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-455) Compiler flag to make optional/required field modifiers compulsory

2017-03-30 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949288#comment-15949288
 ] 

James E. King, III commented on THRIFT-455:
---

THRIFT-4126 presents a php implementation change that does required field 
validation on serialization and deserialization for the binary protocol.  I 
started doing a little bit of work on THRIFT-4142 to change the cross and/or 
functional tests to verify behavior as well, and I'm concerned about the 
general lack of standardization in the area of required field handling, then I 
found this ticket.  It looks it will take a significant effort to properly 
handle required fields.

> Compiler flag to make optional/required field modifiers compulsory
> --
>
> Key: THRIFT-455
> URL: https://issues.apache.org/jira/browse/THRIFT-455
> Project: Thrift
>  Issue Type: New Feature
>  Components: Compiler (General)
>Reporter: Bryan Duxbury
>
> if we are unwilling to globally require users specify "required" or 
> "optional" when creating their structs, I think we should at least add a 
> command line switch that causes us to enforce that behavior. It would 
> certainly make my implementations more reliable, especially when I'm giving 
> non-experts the tools to make their own IDLs.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4062) Remove debug print from TServiceClient

2017-03-30 Thread Vladyslav Valt (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15948452#comment-15948452
 ] 

Vladyslav Valt commented on THRIFT-4062:


[~jking3] thank you, James!

> Remove debug print from TServiceClient
> --
>
> Key: THRIFT-4062
> URL: https://issues.apache.org/jira/browse/THRIFT-4062
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.10.0
>Reporter: Jens Geyer
>Assignee: Tom Davis
>Priority: Critical
> Fix For: 0.11.0
>
>
> GitHub user tdavis opened a pull request:
> https://github.com/apache/thrift/pull/1173
> Remove debug print from TServiceClient
> Client: Java
> You can merge this pull request into a Git repository by running:
> $ git pull https://github.com/tdavis/thrift patch-1
> Alternatively you can review and apply these changes as the patch at:
> https://github.com/apache/thrift/pull/1173.patch
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
> This closes #1173
> 
> 
> commit 670ad408b7f601798db7cf7b659ac231ba53c6a9
> Author: Tom Davis 
> Date:   2017-01-31T17:01:50Z
> Remove debug print from TServiceClient
> 
> Client: Java
> 
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (THRIFT-4062) Remove debug print from TServiceClient

2017-03-30 Thread Vladyslav Valt (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15948452#comment-15948452
 ] 

Vladyslav Valt edited comment on THRIFT-4062 at 3/30/17 5:46 AM:
-

[~jking3] Thank you, James!


was (Author: vladyslav.valt):
[~jking3] thank you, James!

> Remove debug print from TServiceClient
> --
>
> Key: THRIFT-4062
> URL: https://issues.apache.org/jira/browse/THRIFT-4062
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.10.0
>Reporter: Jens Geyer
>Assignee: Tom Davis
>Priority: Critical
> Fix For: 0.11.0
>
>
> GitHub user tdavis opened a pull request:
> https://github.com/apache/thrift/pull/1173
> Remove debug print from TServiceClient
> Client: Java
> You can merge this pull request into a Git repository by running:
> $ git pull https://github.com/tdavis/thrift patch-1
> Alternatively you can review and apply these changes as the patch at:
> https://github.com/apache/thrift/pull/1173.patch
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
> This closes #1173
> 
> 
> commit 670ad408b7f601798db7cf7b659ac231ba53c6a9
> Author: Tom Davis 
> Date:   2017-01-31T17:01:50Z
> Remove debug print from TServiceClient
> 
> Client: Java
> 
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)