Summary: Such that users can supply an event handler to a server that will be used to signal various events that take place inside the server core.
Reviewed By: dreiss
Test Plan: Rebuilt all servers, work by default
Other Notes: Partially submitted and also reviewed by Dave Simpson at Powerset
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665371 13f79535-47bb-0310-9956-ffa450edef68
Summary: Need to pass hints including AI_ADDRCONFIG to getaddrinfo to make sure no IPv6 addresses come back on non-IPv6 enabled systems
Reviewed By: mcslee
Other Notes: Submitted by Paul Saab
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665368 13f79535-47bb-0310-9956-ffa450edef68
Summary: TJSONProtocol for Java with write support and a TSerializer utility for easier conversion of Thrift objects into byte[] or strings.
Reviewed By: dreiss
Test Plan: Included a basic piece of this in test/ client for Java.
Revert: OK
DiffCamp Revision: 3890
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665367 13f79535-47bb-0310-9956-ffa450edef68
Summary: Potentailly breaks Java serialization for protocols that care about container termination.
Reviewed By: dreiss
Test Plan: Generate code, veirfy writeListEnd/writeSetEnd is in the apporpriate place
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665366 13f79535-47bb-0310-9956-ffa450edef68
Summary: Throw a proper EOFError in this case. Long term we want to change this to properly fit into the Thrift TException heirarchy with a good way to handle the original exception as well. For now, Ben is the primary user of this so we'll go ahead with his patch.
Reviewed By: mcslee
Test Plan: Included in test/py/TestEof.py
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665365 13f79535-47bb-0310-9956-ffa450edef68
Summary: This allows the event loop to be shared across different components of a program of for a separate thread in a TNonblockingServer to safely use its own libevent code without conflicts.
Reviewed By: mcslee
Test Plan: Updated test/ committed here
Other Notes: submitted by Ben Maurer, patched in by mcslee with slight modifications
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665364 13f79535-47bb-0310-9956-ffa450edef68
Summary: That's just silly
Reviewed By: peter, dreiss
Test Plan: Generate PHP from a .thrift with no constants. Notice there is no _constants.php generated.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665355 13f79535-47bb-0310-9956-ffa450edef68
Summary: Need to use IPv6 compliant constructs here. Submitted by Paul Saab.
Reviewed By: dreiss
Test Plan: Rebuild Thrift TNonblockingServer with this patch and verify behaves just the same
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665353 13f79535-47bb-0310-9956-ffa450edef68
Summary: * move type field to tException from subclasses
* add backtrace to tException
* add oop:is_a
* on exit, wrap exceptions in {thrift_exception, E} ... otherwise can't distinguish e.g. exit:{{tBinProtException, {tException, ...}}, Stack} vs. exit:{tBinProtException, {tException, ...} -- I hate erlang
* all throws/exits to tException:throw which does the wrapping described above
Reviewed By: eletuchy
Test Plan: been using this code on my live server ^_^
Revert: OK
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665350 13f79535-47bb-0310-9956-ffa450edef68
Summary: Include thrift/autoload.php and use -phpa flag to generated code that works with autoload. Good for services with lots of methods that are typically not all invoked.
Reviewed By: dreiss
Test Plan: Falcon, baby, falcon.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665349 13f79535-47bb-0310-9956-ffa450edef68
Summary: The extension expects a classname as a string and does not allow null;
use the empty string instead of null in the absence of a classname to pass.
Reviewed By: mcslee
Test Plan: php -l
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665347 13f79535-47bb-0310-9956-ffa450edef68
Summary: If you reference enum types from an include you need to fully qualify their namespace in the generated C++ code.
Reviewed By: pfung
Test Plan: fbtypes code that pfung is using
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665345 13f79535-47bb-0310-9956-ffa450edef68
Summary: only return `ok' if it's an async, otherwise return the value of recv_
Reviewed By: cvarenhorst
Test Plan: my server works now
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665344 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* no ?INFO for every oop:call ... way too expensive
* unfactor symbol/1 ... it was that way for a reason apparently
* upped crash report depth to 3
Reviewed By: eletuchy
Test Plan: /much/ less CPU eaten by logging
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665343 13f79535-47bb-0310-9956-ffa450edef68
Summary: crash reports aren't too important so don't be so verbose -- all the pertinent info shows up elsewhere anyway. refactor while we're at it.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665342 13f79535-47bb-0310-9956-ffa450edef68
Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned. better now than later.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665339 13f79535-47bb-0310-9956-ffa450edef68
Summary: make uniform across all tTransports. god i want `effectful' to go away dead. soon.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665338 13f79535-47bb-0310-9956-ffa450edef68
Summary: Apparently adding the static array costs overhead since it must get preinitialized or something? It's unclear exactly what's going on here, but let's test to see if explicit lazy instantiation helps here.
Reviewed By: dreiss
Test Plan: See if this speeds up falcon loading
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665334 13f79535-47bb-0310-9956-ffa450edef68
Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime.
Reviewed By: sgrimm, dreiss
Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665328 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Also updated the CONTRIBUTORS file. Sorry, Boz.
Reviewed By: mcslee
Revert Plan: ok
Other Notes:
Submitted by Igor Afanasyev.
Reviewed by Jake Luciani.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665327 13f79535-47bb-0310-9956-ffa450edef68
Reviewed By: root
Test Plan: Generate PHP code for a .thrift file with an include in it
Other Notes: Reviewed by Todd Lipcon from AmieStreet
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665325 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- unflushed data should be flushed when transport is closed
- this diff calls flush for TBufferedTransport and TFramedTransport
Reviewed By: dreiss
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665323 13f79535-47bb-0310-9956-ffa450edef68
Summary: Same paradigm as in C++ model. Allow ServerTransport to be interrupted to block an accept loop and cleanly stop serving client requests.
Reviewed By: dreiss
Test Plan: Invoke shutdown() method on a TServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665322 13f79535-47bb-0310-9956-ffa450edef68