David Reiss [Wed, 11 Jun 2008 00:56:25 +0000 (00:56 +0000)]
Add thrift_server:stop/1 to stop a running server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666405
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:59:10 +0000 (22:59 +0000)]
Add stress test implementation for new Erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666389
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:59:02 +0000 (22:59 +0000)]
Don't actually ignore all makefiles in .gitignore -- erl makefiles are important!
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666388
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:58 +0000 (22:58 +0000)]
Oops - forgot to add the test/erl/Makefile to git
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666387
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:52 +0000 (22:58 +0000)]
Implement buffered transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666386
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:39 +0000 (22:58 +0000)]
Test server for erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666385
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:33 +0000 (22:58 +0000)]
Properly handle exceptions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666384
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:21 +0000 (22:58 +0000)]
Fix reading of empty structs/arg lists
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666383
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:14 +0000 (22:58 +0000)]
Fix responses for void functions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666382
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:58:07 +0000 (22:58 +0000)]
Make strings read as lists, not as binary
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666381
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:59 +0000 (22:57 +0000)]
Make signedness of integers explicit, and fix double read/write.
Also fix typo of i63 for i64
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666380
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:52 +0000 (22:57 +0000)]
Properly uncapitalize package names when referencing structs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666379
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:44 +0000 (22:57 +0000)]
Fix generation when multiple services are in the same service definition
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666378
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:35 +0000 (22:57 +0000)]
Generator for alternative erl bindings, as well as a few more changes to lib code.
- Exceptions don't work yet, but it looks like everything else does.
- Seems to work fine on our pricing service
- Code could need some cleanup
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666377
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:21 +0000 (22:57 +0000)]
Make processor use a service definition and handler to determine types
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666376
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:57:11 +0000 (22:57 +0000)]
Read and write of structs, lists, maps, and sets
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666375
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:59 +0000 (22:56 +0000)]
Initial commit of alternative erlang lib
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666374
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:48 +0000 (22:56 +0000)]
Avoid a filename collision on case-insensitive filesystems.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666373
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:43 +0000 (22:56 +0000)]
Don't generate a constants file if there are no constants (Java only).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666372
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:34 +0000 (22:56 +0000)]
Fix a bug with initialization in JavaBean-style generated code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666371
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:26 +0000 (22:56 +0000)]
Print an error instead of segfaulting with a bad compiler command line.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666370
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:19 +0000 (22:56 +0000)]
Add newlines to some warning messages in the compiler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666369
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:12 +0000 (22:56 +0000)]
Fix some warnings caused by treating string literals as non-const.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666368
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:56:04 +0000 (22:56 +0000)]
Fix IPv6 on FreeBSD.
On FreeBSD (and possibly other BSDs), binding to ipv6 is restricted unless the
sysctl net.inet6.ip6.v6only=0 or the socket option IPV6_V6ONLY is turned off.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666367
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:54 +0000 (22:55 +0000)]
Fix some indentation in the PHP generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666366
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:46 +0000 (22:55 +0000)]
PHP Generator: Throw an exception on bad types.
Summary:
Previously, if you set a structure field to, say, an int when it was
supposed to be a container (array) or struct (object), the serialization
code would either produce corrupt output (container) or cause a fatal
error (struct). Now they both throw exceptions.
Reviewed By: mcslee
Test Plan: Looked at generated code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666365
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:38 +0000 (22:55 +0000)]
Change Python servers to use the standard logging module.
Previously Thrift was using `print` to report errors. Thrift is infrastructure
and should not impose its error logging mechanism on the apps that use it. For
example, [elided] uses the logging module to send logs to a particular file.
I ran the unit test. That exercises most of the error handling routines.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666364
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:26 +0000 (22:55 +0000)]
Python forking server should close connection in parent.
When a function called by the forking python thrift server throws an
exception the client will hang. This happens because the parent of the
forked process does not properly close the socket fd.
Under normal operation the server operation completes and returns a value to
the client. However, when an exception occurs the 'end' message is never
sent to the client so the client relies on a connection close to abort the
call (this is how the threading server works I believe).
This fails with the forking server because the parent process never closes
the socket fd. The child has closed the fd at this point, but the
connection will not actually be closed until all open instances of the fd
are closed. Since the client is waiting for a message and the server never
closes it the client is forced to wait until a read timeout occurs many
minutes later.
This diff closes the parent's copy of the socket fd immediately after the
fork occurs.
I modified my load test server to throw an exception. The client did not hang.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666363
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:13 +0000 (22:55 +0000)]
Thrift: Allow for alternative Mutex initializers.
Summary:
Add an argument to the Mutex constructor.
It takes a pointer to a function that initializes the internal pthread_mutex_t.
We provide initializers for default pthread_mutex_t (which is our default),
adaptive mutexes, and recursive mutexes.
Reviewed By: hzhao, psaab, mcslee
Test Plan: Built libthrift.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666362
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:55:04 +0000 (22:55 +0000)]
Fix locking bug in ThreadManager.
It looks like the scheduler waits on monitor_, but the worker notifies
workerMonitor_. Also, it does so out of critical section.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666361
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:54:56 +0000 (22:54 +0000)]
FunctionRunner Utility Class.
Runs arbitrary functions of form 'void(void)' and 'void*(void*)'
without need to create custom Runnable classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666360
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:54:49 +0000 (22:54 +0000)]
Forking Python server.
The python threading model does not provide concurrency for CPU-bound
processes. Process forking is the current recommended way of writing
scalable Python servers.
Harry Wang ran the [elided] backend with this change for 3 days and observed
no errors. The threaded backend caused unexplained lockups under this load
after 24 hours.
I also ran a CPU-bound load test against this server with 32 concurrent
clients. It completed 5X faster than the threaded implementation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666359
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:54:40 +0000 (22:54 +0000)]
Add ProfilerRegisterThead() to PosixThread.
Adds an #ifdef'd block that calls ProfilerRegisterThread() if
"REGISTER_THREAD_GOOGLE_PERFTOOLS" is set. Apparently, this makes the
Google perftools CPU profiler work much better on x86-64.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666358
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 10 Jun 2008 22:54:32 +0000 (22:54 +0000)]
Make sure list<byte> is List<Byte> in Java gen'd code.
Reviewed By: dreiss
Test Plan: Generate list<byte> into Java
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666357
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 9 May 2008 19:18:29 +0000 (19:18 +0000)]
Fix a few copy-paste errors in TBufferTransports (not code).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665684
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 9 May 2008 07:17:35 +0000 (07:17 +0000)]
Tweak Java Makefile.ams to fix "make distclean".
The Java Makefile.ams assume the existence of ANT, but "make distclean"
runs in the Java directories even if ENABLE_JAVA is off. This change
makes the clean-local target handle the absence of ANT, fixing
"make distclean".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665683
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 9 May 2008 07:17:34 +0000 (07:17 +0000)]
Check for ptrdiff_t and fail if we don't have it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665682
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 9 May 2008 07:14:10 +0000 (07:14 +0000)]
C++/TFramedTransport: Don't write an empty frame on flush.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665681
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 9 May 2008 00:40:26 +0000 (00:40 +0000)]
Fix a small logic error in TBufferedTransport::borrowSlow.
Was using an unsigned int for a value that could be negative.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665680
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 4 May 2008 03:00:22 +0000 (03:00 +0000)]
Switch md5 implementations.
Specifically, switch from the legally-ambiguous RSA implementation to
a zlib-licensed RFC-based implementation from SourceForge.
Generated some files with "dense" and made sure the output hadn't changed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665679
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 20:51:03 +0000 (20:51 +0000)]
Remove an unnecessary include of boost/lexical_cast.hpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665678
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 06:21:04 +0000 (06:21 +0000)]
Throw a transport exception if fstat fails.
This was failing on an NFS mount that was dying.
Better to fail hard then return uninitialized data.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665677
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 06:17:36 +0000 (06:17 +0000)]
Memory-based transport rewrite.
The old implementations of the memory-based transports (TBufferedTransport,
TFramedTransport, and TMemoryBuffer) shared very little code and all worked
a bit differently. This change unifies them all as subclasses of a single
base (TBufferBase) which handles the fast-path operations (when requests
can be satisfied by the buffer) with inline methods (that will eventually
be made nonvirtual in the template branch) and calls out to pure-virutal
methods to handle full/empty buffers. All of the buffer-management is now
done in terms of "base and bound" pointers rather than "pos" integers.
These classes were moved to TBufferTransports.{h,cpp}. The .h is included
in TTransportUtils for backwards compatibility.
Also added a "TShortReadTransport" to assist testing transports.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665676
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 05:52:50 +0000 (05:52 +0000)]
Properly handle constants of typedef'ed types.
Also throw an error in the compiler if we cannot generate a constant for a
declared const because of its type. Added a test of this functionality in
ConstantsDemo.thrift.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665675
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 05:52:49 +0000 (05:52 +0000)]
Eliminate an unused local variable.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665674
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 1 May 2008 05:52:48 +0000 (05:52 +0000)]
Remove a few unnecessary includes to speed up compiles.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665673
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 29 Apr 2008 23:12:24 +0000 (23:12 +0000)]
C++: Make write{Struct,Field}Begin take "name" as a const char*.
Summary:
These methods previously took name as a const string&. While that way
is more idiomatic, it requires a temporary string to be constructed
when we pass a string literal (which is always). This was significantly
slowing down the serialization of field-heavy structures. This change
will break ABI compatibility, but the serialization speed boost with
no external API changes is too important to pass up.
Reviewed By: mcslee, aditya
Test Plan: make check
TracCamp Project: Thrift
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665672
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 29 Apr 2008 23:09:11 +0000 (23:09 +0000)]
Java: In toString for generated structs, handle nulls.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665671
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 29 Apr 2008 00:29:45 +0000 (00:29 +0000)]
Thrift REST parsing allows null object params
Summary: If JSON objects are passed in allow them to be null and don'\''t default construct.
Reviewed By: dreiss
Test Plan: Regenerate API code and test on object args.
Revert: OK
DiffCamp Revision: 12407
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665670
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 29 Apr 2008 00:29:43 +0000 (00:29 +0000)]
THRIFT: Nonblcoking bug fix
calling decrement with -1 even though param is an integer. Just made it clean by adding a decrement function
reviewed by: mcslee
revertable
test plan: ran on a test server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665669
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 29 Apr 2008 00:29:41 +0000 (00:29 +0000)]
Persistent conns in TSocketPool
Summary: Added support for persistent conns in TSocketPool
Also, added some util functions in TNonblockingServer
Reviewed By: mcslee
Test Plan: Ran a test search cluster with these changes - open was only called once (I put fprintfs in open and close), after which the socket was reused
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 11425
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665668
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Apr 2008 02:51:44 +0000 (02:51 +0000)]
Add a missing include to Benchmark.cpp to make it build on Mac OS.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665667
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Apr 2008 02:42:28 +0000 (02:42 +0000)]
Silence a valgrind complaint by matching "delete[]" with "new[]".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665666
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:08:07 +0000 (18:08 +0000)]
Version bump to
20080411.
Also updated CONTRIBUTORS and NEWS.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665665
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:08:01 +0000 (18:08 +0000)]
Add build.xml, src, and LICENSE to EXTRA_DIST in lib/java/Makefile.am.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665664
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:07:58 +0000 (18:07 +0000)]
Add TBase64Utils.h and TJSONProto.h to lib/cpp/Makefile.am.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665663
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:07:53 +0000 (18:07 +0000)]
Add contrib to EXTRA_DIST so it goes into make dist.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665662
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:07:49 +0000 (18:07 +0000)]
Add a distdir rule to lib/erl/Makefile to make "make check" happy.
This is a gross hack because lib/erl isn't using automake,
but it is still in SUBDIRs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665661
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Apr 2008 18:07:43 +0000 (18:07 +0000)]
Check for ssize_t in configure.ac.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665660
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 20 Apr 2008 05:28:14 +0000 (05:28 +0000)]
Delete a crazy line from fb303's build.xml.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665659
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 18 Apr 2008 17:48:03 +0000 (17:48 +0000)]
Thrift: bug fix for interrupting server socket
Summary: TServerSocket uses a socket pair to signal interruption to the select() call on its main server socket. A bug in the code prevented the select() from listening for events on the internal socket pair; in fact, it was accidentally listening to file descriptor 1.
Reviewed By: aditya
Test Plan: Use a server that supports a call to shutdown, which should signal an interrupt to the internal socket, and should result in an immediate and clean termination of the server socket thread.
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 11932
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665658
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 15 Apr 2008 05:44:00 +0000 (05:44 +0000)]
Add a few missing includes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665657
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Apr 2008 22:36:31 +0000 (22:36 +0000)]
Fix Thrift.cpp for non-Linux systems.
- Add some missing namespace qualifiers that are not used in the glibc case.
- Move an include from Thrift.h to Thrift.cpp.
- Include boost/lexical_cast.hpp in TJSONProtocol, in case we ever eliminate
it from our header files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665656
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Apr 2008 22:00:06 +0000 (22:00 +0000)]
Add simple "check" and "distclean" targets to lib/erl/Makefile.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665655
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Apr 2008 22:00:00 +0000 (22:00 +0000)]
Remove some .pyc files from fb303.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665654
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Apr 2008 21:59:45 +0000 (21:59 +0000)]
Whitespace change for consistency.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665653
13f79535-47bb-0310-9956-
ffa450edef68
dweatherford [Fri, 11 Apr 2008 02:51:44 +0000 (02:51 +0000)]
[thrift] Propogate exceptions from transports in thrift_protocol extension
Summary: Otherwise, it will spin forever if your socket connection gets dropped
or otherwise times out.
Reviewed by: dbraginsky
Test plan: Modified TSocket to always throw an exception on read() and tried
some service calls
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665652
13f79535-47bb-0310-9956-
ffa450edef68
iproctor [Thu, 10 Apr 2008 00:31:55 +0000 (00:31 +0000)]
ocaml and haskell thrift clients now calling readMessageEnd
Summary: I neglected to make the call to readMessageEnd if the client read an app exception in the haskell and ocaml code. Fixed now. The test cases for both now also compile with the new ThriftTest.thrift (though haskell's is still not doing anything but echoing the args)
Reviewed By: dreiss
Test Plan: Ran test code. This bug would actually never show up because there's only tbinaryprotocol implemented for these languages and that does nothing on a readMessageEnd.
Revert: OK
DiffCamp Revision: 11377
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665651
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 19:38:49 +0000 (19:38 +0000)]
Fix a minor bug in TDebugProtocol and remove dead code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665650
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 06:26:27 +0000 (06:26 +0000)]
Use poll instead of select in TServerSocket
Summary: - select has a restricted max fd set size. While this should not be an issue in the normal case for
TServerSocket because it is started when the process starts, it could be a problem if someone wanted
to start a new server socket at a later point in time when socket values could be greater than max.
Reviewed By: dreiss
Test Plan: - Compiled.
- Deployed search tier and made sure it could serve queries.
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 11076
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665649
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 06:26:05 +0000 (06:26 +0000)]
Thrift error logging improvements
Summary: - Move strerror_s to Thrift.h (was previously in TTransportException.h)
- Capture errno as soon as syscall returns failure and make it part of error message.
- Cleaned up several instances of the wrong error value being printed.
- More consistently pass the errno in the TTransport Exception
- Add more consistent error logging for the various transport failure modes
Reviewed By: dreiss
Test Plan: - compile everything.
- test on search tier
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 11077
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665648
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 06:25:45 +0000 (06:25 +0000)]
use poll instead of select in TSocket
Summary: fd_set, which we pass into select only supports fds with values < 1024.
fds can be >= 1024.
this can cause memory corruption
learning this stuff over 2 weeks of examining crazy core dumps is way more fun that reading it up somewhere.
poll takes an array of fds insetad, so your fd can be any int
Reviewed By: dreiss
Test Plan: ran inside a test search cluster
Revert: OK
DiffCamp Revision: 10731
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665647
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:07:26 +0000 (05:07 +0000)]
Fix a bug in TPipedTransport that broke pipelining.
Previously, TPipedTransport wrote it's full buffer to the "pipe" and
fully reset its buffer on a readEnd. This assumed that the buffer was
fully read at that point. This is not the case if requests are pipelined.
This change makes it only pipe out the portion that has been read and
copy the unread portion to the beginning of the buffer.
Also add a test that verifies the new functionality.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665646
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:07:14 +0000 (05:07 +0000)]
Add thrift_dump.cpp to contrib.
thrift_dump is a simple program for converting data from TBinaryProtocol to
TDebugProtocol. Throw it in contrib because it is pretty primitve.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665645
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:06:59 +0000 (05:06 +0000)]
Add TFDTransport: a dead-simple wrapper around a file-descriptor.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665644
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:06:45 +0000 (05:06 +0000)]
Add TProtocolTap: a meta-protocol for "wiretapping".
TProtocolTap is a protocol that passes reads through to a "source" protocol,
but mirrors them as writes to a "sink" protocol.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665643
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:06:32 +0000 (05:06 +0000)]
TDebugProtocol: Add support for messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665642
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 8 Apr 2008 05:06:15 +0000 (05:06 +0000)]
TDebugProtocol: Support a limit on string length.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665641
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 7 Apr 2008 23:45:00 +0000 (23:45 +0000)]
Clean up the unit tests.
- Make Python tests cwd-agnostic.
- Use boost::test.
- Add a benchmark.
- Use a library to clean up test/Makefile.am.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665640
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Apr 2008 23:16:46 +0000 (23:16 +0000)]
Fix some indentation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665639
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Apr 2008 20:16:53 +0000 (20:16 +0000)]
Remove sigplanconf.cls and thrift.pdf.
The license for the cls file is unclear, and the formatted pdf file is
a derivative work. Therefore, it is probably not safe for us to leave
these in the source tree once we go into Apache.
Also put a reference to the source of the cls file in thrift.tex.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665638
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Apr 2008 20:16:45 +0000 (20:16 +0000)]
Update OCamlMakefile to the latest version and include its README.
Updating isn't really necessary, I just wanted to be 100% that I had
the right version of the README for the version of the Makefile we had.
The main reason for including the README is to make the license clear.
Reviewed By: iproctor
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665637
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Apr 2008 20:16:28 +0000 (20:16 +0000)]
Squelch most Java 1.6 warnings.
I actualy wasn't able to test this with Java 1.5.
Hopefully it doesn't break anything.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665636
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Apr 2008 20:16:10 +0000 (20:16 +0000)]
Moved the java libraries from src to src/com/facebook/thrift.
Apparently this is what all the Java kids are doing these days.
Ran ant in lib/java and it built fine.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665635
13f79535-47bb-0310-9956-
ffa450edef68
pwyckoff [Thu, 3 Apr 2008 19:30:55 +0000 (19:30 +0000)]
add fb303 to thrift contrib
Summary: Add clean version of fb303 to thrift contrib readying for open sourcing scribe
Reviewed By: dreiss
Test Plan: bootstrap.sh, make, make install on a fresh machine and then try compiling and running scribe open source version.
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 10841
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665634
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:10:17 +0000 (22:10 +0000)]
Add a test client and server for C#.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665633
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:10:13 +0000 (22:10 +0000)]
C#: Generate proper code for services that inherit from other services.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665632
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:10:09 +0000 (22:10 +0000)]
C#: Catch exceptions by name.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665631
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:10:06 +0000 (22:10 +0000)]
C#: Make TSimpleServer a public class.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665630
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:09:43 +0000 (22:09 +0000)]
C#: Fix a bug in the TApplicationException reader.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665629
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 22:09:03 +0000 (22:09 +0000)]
C# Makefile: New versions of Mono don't require -langversion:linq.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665628
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Apr 2008 00:23:31 +0000 (00:23 +0000)]
Fix a segfault in the compiler.
We weren't initializing our pointers properly, resulting in
a difficult-to-trigger segfault.
Reviewed By: mcslee, bhamadani
Test Plan: Built the modified search IDL.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665627
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 1 Apr 2008 04:17:58 +0000 (04:17 +0000)]
Fix a memory leak in TBinaryProtocol.
Summary:
realloc doesn't free the original pointer when it returns null.
Reviewed By: cpiro
Test Plan: make check
TracCamp Project: Thrift
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665626
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 31 Mar 2008 21:38:29 +0000 (21:38 +0000)]
Add an experiment to measure the likeliness that realloc will avoid a copy.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665625
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:39 +0000 (21:42 +0000)]
Make the Perl generator use non-hardcoded namespaces.
- Make the Perl generator use program->get_namespace("perl")
instead of program->get_perl_package()
- Eliminate the explicit "perl_package" in t_program.
- Deprecate the perl_package token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665624
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:34 +0000 (21:42 +0000)]
Allow the Thrift compiler to be built without the Perl generator.
- Use AX_THRIFT_GEN to make configure support --disable-gen-perl
- Update the compiler Makefile.am to exclude the generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665623
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:30 +0000 (21:42 +0000)]
Remove t_perl_generator.h.
t_perl_generator.h is no longer included anywhere, because
the Perl generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665622
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:23 +0000 (21:42 +0000)]
Make the Perl generator dynamic.
- Modify the Perl generator constructor to fit the new generic interface.
- Register the Perl genrator with the central registry.
- Deprecate the old way of invoking the Perl generator.
- main.cc no longer includes t_pl_generator.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665621
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:16 +0000 (21:42 +0000)]
Make the Ruby generator use non-hardcoded namespaces.
- Make the Ruby generator use program->get_namespace("ruby")
instead of program->get_ruby_namespace()
- Eliminate the explicit "ruby_namespace" in t_program.
- Deprecate the ruby_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665620
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 27 Mar 2008 21:42:11 +0000 (21:42 +0000)]
Allow the Thrift compiler to be built without the Ruby generator.
- Use AX_THRIFT_GEN to make configure support --disable-gen-ruby
- Update the compiler Makefile.am to exclude the generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665619
13f79535-47bb-0310-9956-
ffa450edef68