Client: go
This change improves performance when using TDeserializer with a
resource pool. See https://issues.apache.org/jira/browse/THRIFT-5069 for
more context.
Also add TSerializerPool and TDeserializerPool, which are thread-safe
versions of TSerializer and TDeserializer. Benchmark result shows that
they are both faster and use less memory than the plain version:
$ go test -bench Serializer -benchmem
goos: darwin
goarch: amd64
BenchmarkSerializer/baseline-8 577558 1930 ns/op 512 B/op 6 allocs/op
BenchmarkSerializer/plain-8 452712 2638 ns/op 2976 B/op 16 allocs/op
BenchmarkSerializer/pool-8 591698 2032 ns/op 512 B/op 6 allocs/op
PASS
Modify docker build scripts used in CI test environments in order to put
in place a Maven .m2/settings.xml configuration file that overrides the
repository with the id 'central' with an equivalent "mirror" that uses
https instead of http.
This closes#1988.
* changed this to self in forEach callback
* updated minimum node version to 8.16.2 (Maintenance LTS until December 2019)
changed ws_connection.js to work in the browser, with isomorphic-ws
added exports for `wsConnection`, `createWSConnection`, `createWSClient`
* added exports for WSConnection to browser.js
* extended the sample of nodejs code in the browser with webpack
* tested and updated node version to LTS 10.18.0 Dubnium
discussion based: https://github.com/apache/thrift/pull/1927#discussion_r358140463
Custom go.tag in an IDL no longer removes the existing "db" and "json"
tags but can override them.
This allows us to change default tags in the future without affecting
user defined ones.
Client: go
This closes#1963.
* THRIFT-4252: Close sockets when shut down server
In TThreadPoolServer, threads are blocking in io with open sockets,
as long as clients don't close the connection, server threads are
never stopped even after a shutdown is called on server (because
they are blocked waiting for io).
To be able to stop all server threads properly, server should
proactively close sockets once a shutdown is initiated.
* Fix indentation
Use white space for indentation instead of tabulation.
Currently, the generated exception classes are not hashable under
Python 3 because of the generated `__eq__` method. Exception objects
are generally expected to be hashable by the Python standard library.
Post-construction mutation of an exception object seems like a very
unlikely case, so enable hashing for all exceptions by making them
immutable by default. This also adds a way to opt-out of immutability
by setting the `python.immutable` annotation to `"false"`.
Thrift attempts to work-around the Python 2.7 DeprecationWarning
around `BaseException.message` by using a property. This hack is
unnecessary since `message` is _also_ written as a regular attribute in
the `TException` constructor (and would be in any of its children),
hence the `BaseException_get_message()` wouldn't even be called.
This hack also stands in the way of making exception instances
immutable (which is a prerequisute to fixing THRIFT-4002).