Commit Graph

6176 Commits

Author SHA1 Message Date
Jens Geyer
b5fe1dbc0c Reverted wrongly pushed commits.
- This reverts commit 876aee506b.
- This reverts commit b89316d54b.
2021-02-11 22:49:49 +01:00
Jens Geyer
876aee506b Setup for Visual Studio 2019 + workarounds for some open tickets:
- (NO TICKET) fix Haxe warning
- Referenzdaten PerfTest Delphi und netstd
- "custom build" added to version info
- netstd nuget upgrades
2021-02-10 20:27:08 +01:00
Jens Geyer
b89316d54b Revert "THRIFT-4982 Remove deprecated C# bindings from the code base"
Only compiler, test, lib and tutorial code.
2021-02-10 20:27:08 +01:00
Jihoon Seo
897652e5f0 THRIFT-5348: Update debian/copyright [skip ci]
Patch: Jihoon Seo

This closes #2326
2021-02-10 20:25:47 +01:00
Jens Geyer
2ef0113d69 Consolidated gitignore & added missing EXTRA_DISTs 2021-02-05 12:58:49 +01:00
Christopher Tubbs
ebfa771a26 THRIFT-5274: Enforce Java 8 compatibility
Client: Java
Patch: Christopher Tubbs

This closes #2325

* Enforce Java 8 compatibility using the new `--release` flag introduced
  in JDK9, so that all generated bytecode follows Java 8 strict
  compatibility, even when building with newer JDK versions (9 or later)
  (this fixes NoSuchMethodError with ByteBuffer, and other potential
  incompatibilities in bytecode generation that would make the code
  unable to run on a Java 8 JRE)
* Also strictly enforce the JDK version used to build the project by
  ensuring it is at least version 1.8, and will fail fast when building
  the Java libraries if this condition is not met.
2021-02-04 22:10:30 +01:00
Ting Sun
518163afbd Update README.md
Patch: Ting Sun

This closes #2317
2021-02-04 20:49:45 +01:00
Jens Geyer
de523c79b3 Updated CHANGES to reflect Version 0.14.0 2021-02-04 17:41:23 +01:00
David Mollitor
7ae1ec3f1e THRIFT-5297: Improve TThreadPoolServer Handling of Incoming Connections
Client: Java
Patch: David Mollitor

This closes #2266
2021-02-04 16:39:48 +01:00
belugabehr
ebc2ab558d
THRIFT-5345: Allow the ServerContext to be Unwrapped Programmatically
Client: Java
Patch: David Mollitor
2021-02-04 09:14:11 -05:00
James Lacey
55016bff2b THRIFT-5343: TTlsSocketTransport does not resolve IPv4 addresses or validate hostnames correctly
Client: netstd
Patch: James Lacey

This closes #2322
2021-02-04 10:21:36 +01:00
wangtieju
4aaef75819 THRIFT-5337 Go set fields write improvement
Client: go

There is a duplicate elements check for set in writeFields* function,
and it compares elements using reflect.DeepEqual which is expensive.

It's much faster that generates a *Equals* function for set elements and
call it in duplicate elements check, especially for nested struct
element.

Closes #2307.
2021-02-03 21:05:22 -08:00
Mario Emmenlauer
93d20993f9
Merge pull request #2320 from BioDataAnalysis/THRIFT-5237
THRIFT-5344 follow-up fix to THRIFT 5237 Implement MAX_MESSAGE_SIZE and consolidate limits ...
2021-02-03 17:26:05 +01:00
Jens Geyer
1f73455940 THRIFT-5237 Implement MAX_MESSAGE_SIZE and consolidate limits into a TConfiguration class (cpp)
Client: cpp
Patch: Jens Geyer

Fixes an issue introduced with that ticket
2021-02-03 13:35:36 +01:00
vladimir.panivko
0f21e39c9b THRIFT-5336 Add possibility to setup connection timeout in TCurlClient
Patch: Vladimir Panivko
Client: php

This closes #2306
2021-01-24 12:33:48 +01:00
Jens Geyer
bee96a1ff0 netstd fix IDE warning 2021-01-24 12:31:58 +01:00
Yuxuan 'fishy' Wang
c2ddaf0766 THRIFT-4914: Make TClient.Call to return the response meta
Client: go

Make a breaking change so that TClient.Call returns the response
meta, currently only contains headers but could be expanded in the
future, and make a compiler change to compiler generated clients to take
advantage of that and provide access to response metadata to users.
2021-01-22 20:50:27 -08:00
Yuxuan 'fishy' Wang
8dd04f4adf THRIFT-5322: THeaderTransport protocol id fix
Client: go

This fixes a bug introduced in
https://github.com/apache/thrift/pull/2296, that we mixed the preferred
proto id and the detected proto id, which was a bad idea.

This change separates them, so when we propagate TConfiguration, we only
change the preferred one, which will only be used for new connections,
and leave the detected one from existing connections untouched.

Also add a test for it.
2021-01-22 20:49:57 -08:00
Yuxuan 'fishy' Wang
d9fcdd3dba THRIFT-5338: Remove lib/go/thrift/go.mod
Client: go

Having it under a subdirectory has some unexpected consequences, so
remove it for now. Another PR will be open up later to add it back to
the root directory.
2021-01-20 11:49:24 -08:00
Yuxuan 'fishy' Wang
e27e82c46b THRIFT-5338: Raise minimal supported go version to 1.14.14
Client: go

- Update Dockerfiles used by travis
- Add go.mod file
- Modify error handling code to take advantage of errors package updates
  in go1.13
2021-01-20 09:11:02 -08:00
Yuxuan 'fishy' Wang
0e68e8c51b THRIFT-5326: Make PrependError more unwrap-able
Client: go

As a follow up to https://github.com/apache/thrift/pull/2298, make the
error returned by PrependError unwrap-able in certain cases.
2021-01-19 10:46:29 -08:00
Mario Emmenlauer
7f9abb1cc0 build/cmake/DefinePlatformSpecifc.cmake: Ensure ClangCl on MSVC is recognized as MSVC (because it does not handle -Wall too well) 2021-01-18 08:16:26 +01:00
Yuxuan 'fishy' Wang
d831230929 THRIFT-5326: Expand TException interface in go library
Client: go

Add TExceptionType enum type, and add

    TExceptionType() TExceptionType

function to TException definition.

Also make TProtocolException unwrap-able.
2021-01-17 15:19:44 -08:00
Yuxuan 'fishy' Wang
c4d1c0d800 THRIFT-5322: Implement TConfiguration in Go library
Client: go

Define TConfiguration following the spec, and also move the following
configurations scattered around different TTransport/TProtocol into it:

- connect and socket timeouts for TSocket and TSSLSocket
- tls config for TSSLSocket
- max frame size for TFramedTransport
- strict read and strict write for TBinaryProtocol
- proto id for THeaderTransport

Also add TConfiguration support for the following and their factories:

- THeaderTransport and THeaderProtocol
- TBinaryProtocol
- TCompactProtocol
- TFramedTransport
- TSocket
- TSSLSocket

Also define TConfigurationSetter interface for easier TConfiguration
propagation between wrapped TTransports/TProtocols , and add
implementations to the following for propagation
(they don't use anything from TConfiguration themselves):

- StreamTransport
- TBufferedTransport
- TDebugProtocol
- TJSONProtocol
- TSimpleJSONProtocol
- TZlibTransport

TConfigurationSetter are not implemented by the factories of the
"propagation only" TTransports/TProtocols, if they have a factory. For
those use cases, TTransportFactoryConf and TProtocolFactoryConf are
provided to wrap a factory with the ability to propagate TConfiguration.

Also add simple sanity check for TBinaryProtocol and TCompactProtocol's
ReadString and ReadBinary functions. Currently it only report error if
the header length is larger than MaxMessageSize configured in
TConfiguration, for simplicity.
2021-01-17 12:24:13 -08:00
zeshuai007
c4e899a6d6 try fix appveyor ci 2021-01-09 17:38:16 +08:00
Neil Williams
1c35d6ba95
THRIFT-5331: Py: make THeader subprotocol configurable (#2302)
Client: py

This allows clients to choose which subprotocol (TBinary/TCompact) to frame with headers. The server will already accept either protocol and reply correctly.
2021-01-04 11:27:01 -08:00
Jeffrey Han
13662dd7be THRIFT-5325: Fix Lua library writeStructEnd() in TCompactProtocol
Client: lua
Patch: Jeffrey Han

This closes #2297
2020-12-22 02:11:09 +01:00
Mario Emmenlauer
3b9259d88b TServerSocket.cpp::isOpen(): Check that a domain socket file already exists 2020-12-19 14:22:13 +08:00
Yuxuan 'fishy' Wang
37c2ceb737 THRIFT-5322: Guard against large string/binary lengths in Go
Client: go

In TBinaryProtocol.ReadString, TBinaryProtocol.ReadBinary,
TCompactProtocol.ReadString, and TCompactProtocol.ReadBinary, use
safeReadBytes to prevent from large allocation on malformed sizes.

    $ go test -bench=SafeReadBytes -benchmem
    BenchmarkSafeReadBytes/normal-12                  625057              1789 ns/op            2176 B/op          5 allocs/op
    BenchmarkSafeReadBytes/max-askedSize-12           545271              2236 ns/op           14464 B/op          7 allocs/op
    PASS
2020-12-16 09:31:18 -08:00
Yuxuan 'fishy' Wang
dda80547b1 THRIFT-5324: Create new req buffer for every http request
Client: go

The fix in https://github.com/apache/thrift/pull/2293 doesn't work for
go1.10.8 due to the possibility of data races. This exposes a bigger,
underlying issue regarding the ownership of the request buffer in
THttpClient between THttpClient itself and the http request it creates.
Instead of reset and reuse the same buffer, always give up the ownership
of it and create a new buffer after each Flush call.
2020-12-16 09:27:25 -08:00
Mario Emmenlauer
1e243a76b1 build/cmake/DefineOptions.cmake: Fixed the logic of BUILD_SHARED_LIBS 2020-12-16 11:11:13 +08:00
Jeffrey Han
e872b350ab THRIFT-5282: Add IPv6 client support to Lua library
Client: lua
Patch: Jeffrey Han

This closes #2243
2020-12-15 21:04:14 +01:00
Morozov
4461728f18
THRIFT-5324: reset http client buffer after flush
THttpClient did not reset its internal buffer when HTTP client returned
an error, leaving the whole or partially read message in the buffer.
Now we reset the buffer in defer.

Client: go
2020-12-15 07:35:57 +00:00
Dirkjan Ochtman
70792f2191 Add useful links in Rust client's metadata
Client: Rust
Patch: Dirkjan Ochtman

This closes #2291
2020-12-09 22:12:14 +01:00
Jens Geyer
494a845dd9 THRIFT-5198 Fix certain Visual Studio hints in generated netstd code
Client: netstd
Patch: Jens Geyer
2020-12-09 22:05:36 +01:00
rglarix
10f2556733 THRIFT-5295 makeThread and ThreadFactory extensible
Client: cpp
Patch: Riccardo Ghetta

This closes #2260

Signed-off-by: rglarix <rglarix@users.noreply.github.com>
2020-12-08 22:19:33 +01:00
zeshuai007
fb4b5aa17b Fix Missed check in c_glib for frame max message size check 2020-12-05 14:36:43 +08:00
Jens Geyer
12f6c31c8d THRIFT-5320: Usage of "Task" as IDL identifier generates uncompileable code
Client: netstd
Patch: Jens Geyer

This closes #2289
2020-12-04 21:05:43 +01:00
Sergey Yelin
66777ad215 Fix Erlang CI: Add gen-erl into test's path
Client: erl
Patch: Sergey Yelin

This closes #2290
2020-12-04 21:03:01 +01:00
Mario Emmenlauer
c0619235bd Make ~TException() virtual
Client: cpp
Patch: Mario Emmenlauer

This closes #2281
2020-12-03 23:01:53 +01:00
Jens Geyer
c981cf8891 THRIFT-5317 netstd compiler does not escape keywords
Client: netstd
Patch: Jens Geyer
2020-12-01 22:38:51 +01:00
Mario Emmenlauer
b72b674efc Removed symbolic link tutorial/cl/ensure-externals.sh 2020-11-28 18:04:38 +08:00
Jens Geyer
71e972c970 FIX: Log errors in processor via standard logger -> errors to write into Console.Error as before 2020-11-21 15:27:07 +01:00
Jens Geyer
828ffa8963 silenced few warnings
Client: netstd
Patch: Jens Geyer
2020-11-21 15:19:02 +01:00
Konstantin Pozdniakov
1506661e92 Log errors in processor via standard logger #2284
Client: netstd
Patch: Konstantin Pozdniakov & Jens Geyer

This closes #2284
2020-11-21 15:17:33 +01:00
zeshuai007
966da2992f upgrade msys try get the soft 2020-11-20 09:19:45 +08:00
zeshuai007
c8dab1f37a try update the package to download the software 2020-11-20 09:19:45 +08:00
zeshuai007
b6c886c940 FixDownLoadErrorInAppveyorCi 2020-11-20 09:19:45 +08:00
zeshuai007
a8770a9dd2 rollback 2020-11-20 09:19:45 +08:00
zeshuai007
384a29616e FixDownLoadErrorInCi 2020-11-20 09:19:45 +08:00