[jira] [Updated] (THRIFT-4354) TSocket block on read

2017-10-03 Thread Robert Lu (JIRA)

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

Robert Lu updated THRIFT-4354:
--
Description: 
When \Thrift\Transport\TSocket::read is called, it will block until receive 
$len 
byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])

But, sometimes, other call TSocket::read with large length,
such as 
[TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:

{code}
if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
  $this->rBuf_ = $this->transport_->read($this->rBufSize_);
}
{code}



  was:
When \Thrift\Transport\TSocket::read is called, it will block until receive 
$len 
byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])

But, sometimes, other call TSocket::read with large length,
such as 
[TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:

{code:php}
if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
  $this->rBuf_ = $this->transport_->read($this->rBufSize_);
}
{code}




> TSocket block on read
> -
>
> Key: THRIFT-4354
> URL: https://issues.apache.org/jira/browse/THRIFT-4354
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.9.3, 0.10.0
> Environment: php7.0 + macOS
>Reporter: Robert Lu
>Assignee: Robert Lu
>
> When \Thrift\Transport\TSocket::read is called, it will block until receive 
> $len 
> byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])
> But, sometimes, other call TSocket::read with large length,
> such as 
> [TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:
> {code}
> if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
>   $this->rBuf_ = $this->transport_->read($this->rBufSize_);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4354) TSocket block on read

2017-10-03 Thread Robert Lu (JIRA)
Robert Lu created THRIFT-4354:
-

 Summary: TSocket block on read
 Key: THRIFT-4354
 URL: https://issues.apache.org/jira/browse/THRIFT-4354
 Project: Thrift
  Issue Type: Bug
  Components: PHP - Library
Affects Versions: 0.10.0, 0.9.3
 Environment: php7.0 + macOS
Reporter: Robert Lu
Assignee: Robert Lu


When \Thrift\Transport\TSocket::read is called, it will block until receive 
$len 
byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])

But, sometimes, other call TSocket::read with large length,
such as 
[TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:

{code:php}
if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
  $this->rBuf_ = $this->transport_->read($this->rBufSize_);
}
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1384: THRIFT-4354 TSocket block on read

2017-10-03 Thread RobberPhex
GitHub user RobberPhex opened a pull request:

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

THRIFT-4354 TSocket block on read

ref 

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

$ git pull https://github.com/RobberPhex/thrift THRIFT-4354

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

https://github.com/apache/thrift/pull/1384.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 #1384


commit 0b8c5d42b78f6a9271b8b30e53351004feddb65a
Author: Robert Lu 
Date:   2017-10-03T20:28:00Z

add non-block




---


[GitHub] thrift pull request #1383: THRIFT-4353 cannot read via thrift_protocol at se...

2017-10-03 Thread RobberPhex
GitHub user RobberPhex opened a pull request:

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

THRIFT-4353 cannot read via thrift_protocol at server side

ref 

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

$ git pull https://github.com/RobberPhex/thrift THRIFT-4353

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

https://github.com/apache/thrift/pull/1383.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 #1383


commit 13a4dd1891347f05101af486e1a5bf8f85bf040c
Author: 董菲 
Date:   2016-11-16T02:32:52Z

support php ext read data after message begin

commit 843d87f0c7e69165d1489c7f2dd089b68790720d
Author: 董菲 
Date:   2016-11-16T02:50:22Z

fix

commit 61da80b5ccbe7c63f5187e3296f0453d1abee41d
Author: 董菲 
Date:   2016-11-16T03:53:19Z

fix

commit 3c956e3446438f8d1a1fadaee198a32b71652e58
Author: Robert Lu 
Date:   2017-10-03T19:18:38Z

compiler use thrift_protocol_read_binary_after_message_begin




---


[jira] [Commented] (THRIFT-4353) cannot read via thrift_protocol at server side

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

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

ASF GitHub Bot commented on THRIFT-4353:


GitHub user RobberPhex opened a pull request:

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

THRIFT-4353 cannot read via thrift_protocol at server side

ref 

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

$ git pull https://github.com/RobberPhex/thrift THRIFT-4353

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

https://github.com/apache/thrift/pull/1383.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 #1383


commit 13a4dd1891347f05101af486e1a5bf8f85bf040c
Author: 董菲 
Date:   2016-11-16T02:32:52Z

support php ext read data after message begin

commit 843d87f0c7e69165d1489c7f2dd089b68790720d
Author: 董菲 
Date:   2016-11-16T02:50:22Z

fix

commit 61da80b5ccbe7c63f5187e3296f0453d1abee41d
Author: 董菲 
Date:   2016-11-16T03:53:19Z

fix

commit 3c956e3446438f8d1a1fadaee198a32b71652e58
Author: Robert Lu 
Date:   2017-10-03T19:18:38Z

compiler use thrift_protocol_read_binary_after_message_begin




> cannot read via thrift_protocol at server side
> --
>
> Key: THRIFT-4353
> URL: https://issues.apache.org/jira/browse/THRIFT-4353
> Project: Thrift
>  Issue Type: Improvement
>  Components: PHP - Library
>Affects Versions: 0.9.3, 0.10.0
> Environment: php7 + macOS
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When server read message, the processor read the method name, and then server 
> will know the $args type.
> At this time, We cannot use thrift_protocol_read_binary, because message head 
> is already read.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4353) cannot read via thrift_protocol at server side

2017-10-03 Thread Robert Lu (JIRA)
Robert Lu created THRIFT-4353:
-

 Summary: cannot read via thrift_protocol at server side
 Key: THRIFT-4353
 URL: https://issues.apache.org/jira/browse/THRIFT-4353
 Project: Thrift
  Issue Type: Improvement
  Components: PHP - Library
Affects Versions: 0.10.0, 0.9.3
 Environment: php7 + macOS
Reporter: Robert Lu
Assignee: Robert Lu
Priority: Minor


When server read message, the processor read the method name, and then server 
will know the $args type.
At this time, We cannot use thrift_protocol_read_binary, because message head 
is already read.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4354) TSocket block on read

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

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

ASF GitHub Bot commented on THRIFT-4354:


GitHub user RobberPhex opened a pull request:

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

THRIFT-4354 TSocket block on read

ref 

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

$ git pull https://github.com/RobberPhex/thrift THRIFT-4354

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

https://github.com/apache/thrift/pull/1384.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 #1384


commit 0b8c5d42b78f6a9271b8b30e53351004feddb65a
Author: Robert Lu 
Date:   2017-10-03T20:28:00Z

add non-block




> TSocket block on read
> -
>
> Key: THRIFT-4354
> URL: https://issues.apache.org/jira/browse/THRIFT-4354
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.9.3, 0.10.0
> Environment: php7.0 + macOS
>Reporter: Robert Lu
>Assignee: Robert Lu
>
> When \Thrift\Transport\TSocket::read is called, it will block until receive 
> $len 
> byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])
> But, sometimes, other call TSocket::read with large length,
> such as 
> [TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:
> {code}
> if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
>   $this->rBuf_ = $this->transport_->read($this->rBufSize_);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4350) Update netcore build for dotnet 2.0 sdk and make cross validation

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

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

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


I'd appreciate some feedback on this pull request.  It sets the bar rather 
high, and the server based cross tests are not working, but it brings client 
tests into make cross and brings the project up to supporting the official 
dotnet 2.0 release.  I think it's a step forward overall, but I need to know if 
the step is too far forward.  I tried backing off to .NET core 1.1 but it 
wasn't trivial so that's why I left everything at the 2.0 language level in 
this PR.

> Update netcore build for dotnet 2.0 sdk and make cross validation
> -
>
> Key: THRIFT-4350
> URL: https://issues.apache.org/jira/browse/THRIFT-4350
> Project: Thrift
>  Issue Type: Improvement
>  Components: .NETCore - Library
>Affects Versions: 0.10.0
> Environment: docker ubuntu-xenial
>Reporter: James E. King, III
>Assignee: James E. King, III
>
> # Add dotnet core 2.0.0 official to the docker build image (xenial)
> # Convert projects using "dotnet migrate"
> # Ensure one can build on Windows inside Visual Studio 2017 using the project 
> that is checked in
> # Ensure one can build on Linux using the project that is checked in and use 
> make check
> # Set the target framework to netcoreapp2.0 - required for threading to work?
> # Enable netcore in make cross
> # Fix issues found:
> ## netcore library never increases the sequence id number



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4352) Ubuntu Artful doesn't appear to be compatible with Thrift and Haxe 3.4

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

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

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


Ubuntu Xenial is the current official docker image for builds and will build 
most languages (I noticed OCaml is currently not in the build).  I'm working on 
a number of things that will improve build language coverage and CI 
optimization of the builds, and they will all arrive together, so to make 
forward progress with this effort I need to disable haxe in the artful docker 
image for now.  I have no idea how to debug this particular issue and the 
xenial image is the official build image right now, so disabling it in artful 
for now is fine.

> Ubuntu Artful doesn't appear to be compatible with Thrift and Haxe 3.4
> --
>
> Key: THRIFT-4352
> URL: https://issues.apache.org/jira/browse/THRIFT-4352
> Project: Thrift
>  Issue Type: Bug
>  Components: Haxe - Library
>Affects Versions: 0.10.0
> Environment: docker ubuntu-artful
>Reporter: James E. King, III
>
> I'm working on the artful image, and haxe fails make check, so I have 
> disabled haxe in artful builds:
> {noformat}
> TestServerHandler.hx:51: testVoid()
> TestClient.hx:926: 1.262 ms per testVoid() call
> TestClient.hx:100: ===
> TestClient.hx:101: Tests executed122
> TestClient.hx:102: Tests succeeded   122 (100%)
> TestClient.hx:103: Tests failed  0 (0%)
> TestClient.hx:109: ===
> TestClient.hx:135: total test time: 1.396 seconds
> TSocket.hx:167: Eof Eof
> sleep 10
> timeout 20 php -S 127.0.0.1:9090 router.php &
> sleep 1
> PHP 7.1.8-1ubuntu1 Development Server started at Sun Oct  1 23:24:37 2017
> Listening on http://127.0.0.1:9090
> Document root is /thrift/src/test/haxe
> Press Ctrl-C to quit.
> bin/Main-debug client --transport http
> TestClient.hx:216: - http client : http://localhost:9090
> TestClient.hx:237: - binary protocol
> TestClient.hx:252: - 1 iterations
> TestClient.hx:437: testException("Xception")
> TestClient.hx:85: FAIL: testException("Xception")  -  OutsideBounds
> TestClient.hx:453: testException("TException")
> TestClient.hx:85: FAIL: testException("TException")  -  OutsideBounds
> TestClient.hx:473: testException("bla")
> TestClient.hx:85: FAIL: testException("bla")  -  OutsideBounds
> TestClient.hx:485: testVoid()
> Makefile:693: recipe for target 'check_php_web' failed
> make: *** [check_php_web] Segmentation fault (core dumped)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)