> On May 12, 2015, 7:04 p.m., Norris Lee wrote:
> > Ran some quick tests against it. If nothing happens within the heartbeat 
> > timeout (ie. no queries ran within 15 seconds), ERR_QRY_COMMERR in 
> > handleRead gets triggered and no further queries can be run.
> 
> Parth Chandra wrote:
>     The only time a ERR_QRY_COMMERR occurs is if the call to 
> m_socket.read_some has an error which is an error trying to read from the 
> server. What is the error message?

I tried it with Drill Explorer and it just hung. The drillclient logs had this 
(note the timestamps):

2015-May-12 13:04:52 : TRACE : 5660 : DrillClientImpl::processQueryResult: 0 
requests pending.
2015-May-12 13:04:52 : TRACE : 419c : Clearing state for Query Id - 
[3075293457945872364:8516570227032534528] 
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl:: Heartbeat timer expired.
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl::Heartbeat Timer -  
Expires at: 2015-May-12 20:05:07.556013 and time now is: 2015-May-12 
20:05:07.562013
2015-May-12 13:05:07 : TRACE : 5660 : Heartbeat sent.
2015-May-12 13:05:07 : TRACE : 5660 : Read blocked waiting for memory.
2015-May-12 13:05:07 : TRACE : 5660 : Started new query wait timer with 30 
seconds.
2015-May-12 13:05:07 : TRACE : 5660 : Reset Heartbeat timer.
2015-May-12 13:05:07 : TRACE : 5660 : Started new heartbeat timer with 15 
seconds.
2015-May-12 13:05:07 : DEBUG : 5660 : DrillClientImpl::getNextResult: 
async_read from the server
2015-May-12 13:05:07 : TRACE : 5660 : Started new heartbeat timer with 15 
seconds.
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl:: Heartbeat timer expired.
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl::handleRead: Handle Read 
from buffer 0000000020606550
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl::handleRead: Cancel 
deadline timer.
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl::handleRead: 
ERR_QRY_COMMERR. Boost Communication Error: End of file
2015-May-12 13:05:07 : TRACE : 5660 : Socket shutdown
2015-May-12 13:05:07 : TRACE : 5660 : DrillClientImpl:: Heartbeat timer expired.
2015-May-12 13:05:08 : DEBUG : 419c : Sent query request. Coordination id = 1178
2015-May-12 13:05:08 : DEBUG : 419c : Sending query request. Number of pending 
requests = 1
2015-May-12 13:05:08 : TRACE : 419c : Read blocked waiting for memory.
2015-May-12 13:05:08 : TRACE : 419c : Started new query wait timer with 30 
seconds.
2015-May-12 13:05:08 : TRACE : 419c : Reset Heartbeat timer.
2015-May-12 13:05:08 : TRACE : 419c : Started new heartbeat timer with 15 
seconds.
2015-May-12 13:05:08 : DEBUG : 419c : DrillClientImpl::getNextResult: 
async_read from the server


- Norris


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34072/#review83453
-----------------------------------------------------------


On May 12, 2015, 4:54 a.m., Parth Chandra wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34072/
> -----------------------------------------------------------
> 
> (Updated May 12, 2015, 4:54 a.m.)
> 
> 
> Review request for drill, Hanifi Gunes and Norris Lee.
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> DRILL-2998: Implement heartbeat in C++ client.
> 
> As a result of adding a heartbeat mechanism, the client is always listening 
> for a response from the hearbeat (i.e always has a request pending). The wait 
> for results call therefore now returns when the number of query results 
> pending is zero. Patch also includes a fix for a double delete caused by 
> copying a pointer to the error object in the broadcastError call.
> The patch does not address all cases of detecting when a connection to the 
> server is gone (this will be addressed in a subsequent fix).
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 
> 85e89e0c2429563c411f1e6a8c32f8c8fccf5f03 
>   contrib/native/client/src/clientlib/drillClient.cpp 
> 7162f63d16d4107f555c2ed3f66f7fc79e22ee0c 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp 
> 04d59c763cc9b160ebdba83579863c4856acd701 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp 
> eca0e75167620194c848ec38c457c496514653c6 
>   contrib/native/client/src/include/drill/common.hpp 
> 2fa09545c6283faa6ff8aa0669ee4cde488088dc 
>   contrib/native/client/src/include/drill/drillClient.hpp 
> d7bf33c076f37cd244ee8cd604868d9710e450f4 
>   contrib/native/client/src/protobuf/BitControl.pb.h 
> 865d3772843d2316e7a5f34fad42621e6360f14d 
>   contrib/native/client/src/protobuf/BitControl.pb.cc 
> 827f708150df80908e9437a23ec4f915cb5efd7a 
>   contrib/native/client/src/protobuf/GeneralRPC.pb.h 
> 49f4bf7f7e80939066037183c96d83f140bd7a9e 
>   contrib/native/client/src/protobuf/GeneralRPC.pb.cc 
> 0ebb3a97c20dc1eabf3ebfc62b649be2fad12443 
>   contrib/native/client/src/protobuf/User.pb.h 
> c7deac38a025507bf4da16bb20d0ebce4d84571a 
>   contrib/native/client/src/protobuf/User.pb.cc 
> 59f215795374e6f22316fe6fa5db588dfe770e9b 
>   contrib/native/client/src/protobuf/UserBitShared.pb.h 
> e2f5fd0faeddc5968f0cdafd2200f46246210d31 
>   contrib/native/client/src/protobuf/UserBitShared.pb.cc 
> b07ecda41b5159458c1d3f7d215afc6835ccf809 
> 
> Diff: https://reviews.apache.org/r/34072/diff/
> 
> 
> Testing
> -------
> 
> Tested with broken connections on Mac. Linix and Win64
> 
> 
> Thanks,
> 
> Parth Chandra
> 
>

Reply via email to