[jira] [Created] (THRIFT-4674) Add stream context support into PHP/THttpClient

2018-11-22 Thread Evgeniy Efimov (JIRA)
Evgeniy Efimov created THRIFT-4674:
--

 Summary: Add stream context support into PHP/THttpClient
 Key: THRIFT-4674
 URL: https://issues.apache.org/jira/browse/THRIFT-4674
 Project: Thrift
  Issue Type: Improvement
Reporter: Evgeniy Efimov


In some use-cases it is required to pass additional data into context for 
THttpClient, client certificate as an example.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4671) c glib is unable to handle client close unexpectedly

2018-11-22 Thread lixiasong (JIRA)


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

lixiasong commented on THRIFT-4671:
---

1. fixed the function return result from INT32 coverts to UINT32 ;
2. fixed the condition in line 482 "ftype == T_STOP" will never be satisfied 
when the client socket closed before sending data to server.

> c glib is unable to handle client close unexpectedly
> 
>
> Key: THRIFT-4671
> URL: https://issues.apache.org/jira/browse/THRIFT-4671
> Project: Thrift
>  Issue Type: Bug
>  Components: C glib - Library
>Affects Versions: 0.11.0
> Environment: ubuntu 16.04 
> thrift sever: c_glib
> thrift client: c_glib, go
>Reporter: lixiasong
>Priority: Major
>  Labels: easyfix, ready-to-commit
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When using c_glib thrift server. Once a client connects to the server *but 
> does nothing (didn't send data to server) when being connected*. If the 
> client closed unexpectedly(such as being killed) at the moment, *the 
> thrift-work thread for that client wont't be closed* and read the closed 
> client sock fd in the server forever.
> *I*t has been fixed in my branch, and will be tested and committed later if 
> it runs well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4671) c glib is unable to handle client close unexpectedly

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-4671:


BoringKen opened a new pull request #1635: THRIFT-4671: handle client's 
unexpected close.
URL: https://github.com/apache/thrift/pull/1635
 
 
   THRIFT-: handle client's unexpected close. Avoid the server work thread 
falling into dead loop.
   Client: c_glib
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> c glib is unable to handle client close unexpectedly
> 
>
> Key: THRIFT-4671
> URL: https://issues.apache.org/jira/browse/THRIFT-4671
> Project: Thrift
>  Issue Type: Bug
>  Components: C glib - Library
>Affects Versions: 0.11.0
> Environment: ubuntu 16.04 
> thrift sever: c_glib
> thrift client: c_glib, go
>Reporter: lixiasong
>Priority: Major
>  Labels: easyfix, ready-to-commit
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When using c_glib thrift server. Once a client connects to the server *but 
> does nothing (didn't send data to server) when being connected*. If the 
> client closed unexpectedly(such as being killed) at the moment, *the 
> thrift-work thread for that client wont't be closed* and read the closed 
> client sock fd in the server forever.
> *I*t has been fixed in my branch, and will be tested and committed later if 
> it runs well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (THRIFT-4673) IAsyncResult not supported by layered transports (buffered/framed)

2018-11-22 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-4673:
--

 Summary: IAsyncResult not supported by layered transports 
(buffered/framed)
 Key: THRIFT-4673
 URL: https://issues.apache.org/jira/browse/THRIFT-4673
 Project: Thrift
  Issue Type: Improvement
  Components: C# - Library
Reporter: Jens Geyer
Assignee: Jens Geyer


The IAsyncResult call style is  not supported by both TBufferedTransport and 
TFramedTransport, causing any call to fail that uses these methods. See 
THRIFT-4672 for a possible scenario.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (THRIFT-4672) IAsyncResult style methods not being supported by certain transports leads to issues in mixed ISync/IAsync use cases

2018-11-22 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-4672:
--

 Summary: IAsyncResult style methods not being supported by certain 
transports leads to issues in mixed ISync/IAsync use cases
 Key: THRIFT-4672
 URL: https://issues.apache.org/jira/browse/THRIFT-4672
 Project: Thrift
  Issue Type: Bug
  Components: C# - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer


The {{csharp:async}} switch causes the compiler to change the implementation of 
the client side call stubs to always use IAsyncResult. This causes issues, 
because the IAsyncResult call style is not supported by all transports.

If such a transport is used, the code finally calls the {{TTransport}} 
implementations of {{BeginFlush}} and {{EndFlush}} - either one of these simply 
throws an exception, causing the outgoing call to fail.

What is highly unexpected here is the fact, that due to the {{send_Xxx}} method 
implementation change also {{ISync}} interface is affected as soon as 
{{csharp:async}} is used.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (THRIFT-4671) c glib is unable to handle client close unexpectedly

2018-11-22 Thread lixiasong (JIRA)
lixiasong created THRIFT-4671:
-

 Summary: c glib is unable to handle client close unexpectedly
 Key: THRIFT-4671
 URL: https://issues.apache.org/jira/browse/THRIFT-4671
 Project: Thrift
  Issue Type: Bug
  Components: C glib - Library
Affects Versions: 0.11.0
 Environment: ubuntu 16.04 

thrift sever: c_glib

thrift client: c_glib, go
Reporter: lixiasong


When using c_glib thrift server. Once a client connects to the server *but does 
nothing (didn't send data to server) when being connected*. If the client 
closed unexpectedly(such as being killed) at the moment, *the thrift-work 
thread for that client wont't be closed* and read the closed client sock fd in 
the server forever.

*I*t has been fixed in my branch, and will be tested and committed later if it 
runs well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4654) Thrift Dart port is not compatible with Dart 2

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-4654:


jeking3 commented on issue #1617: THRIFT-4654 Minor fixes for dart 1 & 2 
compatibility (backwards compatible)
URL: https://github.com/apache/thrift/pull/1617#issuecomment-441031973
 
 
   Reminder: this needs more work.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Thrift Dart port is not compatible with Dart 2
> --
>
> Key: THRIFT-4654
> URL: https://issues.apache.org/jira/browse/THRIFT-4654
> Project: Thrift
>  Issue Type: Improvement
>  Components: Dart - Library
> Environment: Any OS, under Dart 2+
>Reporter: Rob Becker
>Assignee: James E. King III
>Priority: Minor
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It is not possible to use the Dart thrift code under Dart 2. Dart 2 requires 
> opting in via a setting in the pubspec.yaml and the code needs to update the 
> use of all caps constant names to the new camel case names.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (THRIFT-4668) make socket backlog configurable for python

2018-11-22 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4668.
---
   Resolution: Fixed
 Assignee: James E. King III
Fix Version/s: 1.0

Committed - thanks.

> make socket backlog configurable for python
> ---
>
> Key: THRIFT-4668
> URL: https://issues.apache.org/jira/browse/THRIFT-4668
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Affects Versions: 0.11.0
>Reporter: lsh
>Assignee: James E. King III
>Priority: Minor
>  Labels: patch
> Fix For: 1.0
>
>
> The backlog parameter of socket.listen was hard coded, so I can't customize 
> it in my code.
> Adding `setBacklog` to `TServerSocket` can resolve my problem. :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4668) make socket backlog configurable for python

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-4668:


jeking3 closed pull request #1631: THRIFT-4668: make socket backlog 
configurable for python
URL: https://github.com/apache/thrift/pull/1631
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib/py/src/transport/TSocket.py b/lib/py/src/transport/TSocket.py
index c91de9d701..a7d661703d 100644
--- a/lib/py/src/transport/TSocket.py
+++ b/lib/py/src/transport/TSocket.py
@@ -159,6 +159,15 @@ def __init__(self, host=None, port=9090, unix_socket=None, 
socket_family=socket.
 self._unix_socket = unix_socket
 self._socket_family = socket_family
 self.handle = None
+self._backlog = 128
+
+def setBacklog(self, backlog=None):
+if not self.handle:
+self._backlog = backlog
+else:
+# We cann't update backlog when it is already listening, since the
+# handle has been created.
+logger.warn('You have to set backlog before listen.')
 
 def listen(self):
 res0 = self._resolveAddr()
@@ -183,7 +192,7 @@ def listen(self):
 if hasattr(self.handle, 'settimeout'):
 self.handle.settimeout(None)
 self.handle.bind(res[4])
-self.handle.listen(128)
+self.handle.listen(self._backlog)
 
 def accept(self):
 client, addr = self.handle.accept()


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> make socket backlog configurable for python
> ---
>
> Key: THRIFT-4668
> URL: https://issues.apache.org/jira/browse/THRIFT-4668
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Affects Versions: 0.11.0
>Reporter: lsh
>Priority: Minor
>  Labels: patch
>
> The backlog parameter of socket.listen was hard coded, so I can't customize 
> it in my code.
> Adding `setBacklog` to `TServerSocket` can resolve my problem. :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4668) make socket backlog configurable for python

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-4668:


jeking3 commented on issue #1631: THRIFT-4668: make socket backlog configurable 
for python
URL: https://github.com/apache/thrift/pull/1631#issuecomment-441031649
 
 
   Build failure is the SBCL issue we know about.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> make socket backlog configurable for python
> ---
>
> Key: THRIFT-4668
> URL: https://issues.apache.org/jira/browse/THRIFT-4668
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Affects Versions: 0.11.0
>Reporter: lsh
>Priority: Minor
>  Labels: patch
>
> The backlog parameter of socket.listen was hard coded, so I can't customize 
> it in my code.
> Adding `setBacklog` to `TServerSocket` can resolve my problem. :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4670) Twisted, slots, and void method fails with "object has no attribute 'success'"

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-4670:


jeking3 closed pull request #1632: THRIFT-4670: Twisted, slots, and void method 
fails with "object has no attribute 'success'"
URL: https://github.com/apache/thrift/pull/1632
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/compiler/cpp/src/thrift/generate/t_py_generator.cc 
b/compiler/cpp/src/thrift/generate/t_py_generator.cc
index 9c82b6cf2a..f0a153ca8b 100644
--- a/compiler/cpp/src/thrift/generate/t_py_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_py_generator.cc
@@ -1961,8 +1961,10 @@ void 
t_py_generator::generate_process_function(t_service* tservice, t_function*
   indent(f_service_) << "def write_results_success_" << 
tfunction->get_name()
  << "(self, success, result, seqid, oprot):" << endl;
   indent_up();
-  f_service_ << indent() << "result.success = success" << endl
- << indent() << "oprot.writeMessageBegin(\"" << 
tfunction->get_name()
+  if (!tfunction->get_returntype()->is_void()) {
+f_service_ << indent() << "result.success = success" << endl;
+  }
+  f_service_ << indent() << "oprot.writeMessageBegin(\"" << 
tfunction->get_name()
  << "\", TMessageType.REPLY, seqid)" << endl
  << indent() << "result.write(oprot)" << endl
  << indent() << "oprot.writeMessageEnd()" << endl


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Twisted, slots, and void method fails with "object has no attribute 'success'"
> --
>
> Key: THRIFT-4670
> URL: https://issues.apache.org/jira/browse/THRIFT-4670
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Compiler
>Affects Versions: 0.9.3, 0.10.0, 0.11.0
>Reporter: Palmer
>Priority: Minor
>
> When generating Twisted code for a void method, the compiler accidentally 
> assigns a value to the result.success field of the result object, even 
> though, as a void method, there is no success value and the result object has 
> no such field. If the slots option is not specified as well, this does not 
> cause a problem, it just sets a new field that is never used. However, with 
> the slots option, attempting to set this undefined field causes the error 
> "object has no attribute 'success'"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (THRIFT-4670) Twisted, slots, and void method fails with "object has no attribute 'success'"

2018-11-22 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4670.
---
   Resolution: Fixed
 Assignee: James E. King III
Fix Version/s: 1.0

Committed - thanks!

> Twisted, slots, and void method fails with "object has no attribute 'success'"
> --
>
> Key: THRIFT-4670
> URL: https://issues.apache.org/jira/browse/THRIFT-4670
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Compiler
>Affects Versions: 0.9.3, 0.10.0, 0.11.0
>Reporter: Palmer
>Assignee: James E. King III
>Priority: Minor
> Fix For: 1.0
>
>
> When generating Twisted code for a void method, the compiler accidentally 
> assigns a value to the result.success field of the result object, even 
> though, as a void method, there is no success value and the result object has 
> no such field. If the slots option is not specified as well, this does not 
> cause a problem, it just sets a new field that is never used. However, with 
> the slots option, attempting to set this undefined field causes the error 
> "object has no attribute 'success'"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-3143) add typescript directory support

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-3143:


mustafa-cosar edited a comment on issue #1630: THRIFT-3143: Add nodets support
URL: https://github.com/apache/thrift/pull/1630#issuecomment-440996256
 
 
   I reverted C++11 features and rebased.
   
   One of the tests failed because of a lisp test. Not related to my changes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> add typescript directory support
> 
>
> Key: THRIFT-3143
> URL: https://issues.apache.org/jira/browse/THRIFT-3143
> Project: Thrift
>  Issue Type: New Feature
>  Components: Node.js - Compiler
>Reporter: Kazuki Yasufuku
>Priority: Major
>
> Current typescript support is only work for browser, and generated d.ts uses 
> internal module.
> So, it's hard to use for typescript in node.js.
> To solve probrem, I make a pull request that generate typescript code 
> directory.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-3143) add typescript directory support

2018-11-22 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on THRIFT-3143:


mustafa-cosar commented on issue #1630: THRIFT-3143: Add nodets support
URL: https://github.com/apache/thrift/pull/1630#issuecomment-440996256
 
 
   One of the tests failed because of a lisp test. Not related to my changes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> add typescript directory support
> 
>
> Key: THRIFT-3143
> URL: https://issues.apache.org/jira/browse/THRIFT-3143
> Project: Thrift
>  Issue Type: New Feature
>  Components: Node.js - Compiler
>Reporter: Kazuki Yasufuku
>Priority: Major
>
> Current typescript support is only work for browser, and generated d.ts uses 
> internal module.
> So, it's hard to use for typescript in node.js.
> To solve probrem, I make a pull request that generate typescript code 
> directory.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)