As the summary suggests, this patch causes "optional" fields to be skipped if they are unset, even if they are primitives. As this patch is for the non-beans style generator, the user is expected to maintain the set/unset status themselves.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@793778 13f79535-47bb-0310-9956-ffa450edef68
This patch causes Java servers to log internal server errors and return an INTERNAL_ERROR exception instead of just closing the connection.
Author: Jonathan Ellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@785713 13f79535-47bb-0310-9956-ffa450edef68
Add a client option that causes clients to monitor their creators
and terminate when the creator dies. This makes it possible to
prevent client leaks without linking, because the latter causes
application code to be killed when a transport error occurs and
exits are not trapped.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781636 13f79535-47bb-0310-9956-ffa450edef68
Add a client option to prevent the initial connect (which causes
the protocol factory to be ignored). The main use case for this
is testing the proper handling of clients that cannot connect.
Update the tether test to use this feature instead of a raw
gen_server:start call.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781635 13f79535-47bb-0310-9956-ffa450edef68
- Create a thrift_client:start function that accepts client options.
- Make start_link a wrapper that adds {monitor, link}.
- Add a test to make sure that everything dies or doesn't die as expected.
(The test has to be run manually.)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781634 13f79535-47bb-0310-9956-ffa450edef68
The old code didn't notify waiters when the inserted task's timeout
was less than the current timeout because it didn't check the task map
to find the lowest timeout until after the new task was inserted.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781630 13f79535-47bb-0310-9956-ffa450edef68
This patch uses a hash function that takes into account the hashes of struct elements, instead of just returning 0. This make hashes of Thrift structs O(1) instead of O(n).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780094 13f79535-47bb-0310-9956-ffa450edef68
- Added some stuff to EXTRA_DIST.
- Added some non-compiled sources to a C++ test.
- Made lib/perl/test a SUBDIR of lib/perl.
The last is a revert of r766558, but I moved the "Types.pm" rules in
lib/perl/test/Makefile.am to the check-local target, so it should still
work as expected (per THRIFT-461).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777681 13f79535-47bb-0310-9956-ffa450edef68
- Put "AC_SUBST(CLASSPATH)" configure.ac so the CLASSPATH used to run
./configure is passed in to make.
- Put "export CLASSPATH" in lib/java/Makefile.am so that the CLASSPATH
passed to make is passed to ant.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777678 13f79535-47bb-0310-9956-ffa450edef68
I'm not sure why, but "ant test" under lib/java doesn't pass the
global classpath to the test programs. (This is weird because
compile-test does.) This change manually extracts the CLASSPATH
environment variable and adds it to the test classpath.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777677 13f79535-47bb-0310-9956-ffa450edef68
Also make a few tweaks to configure.ac:
- Check for clock_gettime in librt since it seems to be more
widely available.
- Make it clear which AC_CHECK_FUNCS are optional.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776927 13f79535-47bb-0310-9956-ffa450edef68
Previously, TSocket.write would raise an AttributeError if the transport
had not been opened. A TTransportException with the code set to
NOT_OPEN is more appropriate. The cost of the check should be
negligible, since TSocket.write is already fairly expensive (it does a
system call).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773762 13f79535-47bb-0310-9956-ffa450edef68