Commit Graph

33 Commits

Author SHA1 Message Date
Evan Tschannen 1cec223434 cherry pick streaming replies to master 2021-06-19 09:47:13 -07:00
Steve Atherton 434f41a093 Renamed members of UnitTestParameters to look cleaner. Added getDouble(). Updated more Redwood unit test parameters to be initialized from params. 2021-04-07 18:14:44 -07:00
Steve Atherton b4e42476b7 Unit test parameters are no longer global, they are accessible via a parameter to the unit test and initialized from otherwise unconsumed test options for the UnitTests workload in the test spec or from the fdbserver command line when using the unittests role. 2021-04-06 02:36:10 -07:00
Steve Atherton e7573d546f Some unit tests names had a prefixed "!" in order to be excluded from random selection, this has been changed to a ":" as it is less problematic on the command line. Some Redwood unit tests have been enabled for random selection. 2021-04-05 00:03:15 -07:00
Steve Atherton eec119e0d0 Added an fdbserver role to run unit tests directly without a cluster or test spec file, and added a unit test parameters concept for passing options into unit tests.
Updated p2p network test to use unit test parameters instead of the environment.
2021-04-04 23:27:34 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Andrew Noyes 79cec09255 Apply clang-tidy's performance-inefficient-vector-operation fix
I ran this command in my build directory after compiling with
OPEN_FOR_IDE. It took a few small tweaks to get it to compile, which is
outside the scope of this commit.

    $ python run-clang-tidy.py -j $(nproc) -checks='-*,performance-inefficient-vector-operation' -fix
2021-03-04 03:58:25 +00:00
sfc-gh-tclinkenbeard 0814841827 Replace NULL with nullptr in fdbserver 2020-09-20 11:31:49 -07:00
Steve Atherton d375ee7939 Rolled back the knob and logic for doing multiple write() calls in write loops before yielding, because they are not necessary. The testing that suggested otherwise was in error. 2020-07-16 22:54:14 -07:00
Steve Atherton c4f3553826 TLS handshake limit changed to regular flow lock, added new knob for simultaneous handshakes limit and removed old knobs. Added knob to control how much data the FlowTransport connectionWriter() can write using multiple write() calls before yielding to other tasks, and updated p2p network test to use the same logic. Changed knob defaults for send limit on single writes and TLS handshake thread count. 2020-07-16 02:31:17 -07:00
Steve Atherton 97cc0a63e0 P2P network test now does a request/response sequence on outgoing connections and repeats it a configurable number of times. 2020-07-06 15:14:53 -07:00
Steve Atherton a8d56ddd41 Don't delay after incoming accept() error. 2020-07-03 12:22:41 -07:00
Steve Atherton 0da4c91ad5 Performance improvements in socket use and buffering which results in TLS network connections using around 3.5x less CPU.
PacketBuffers are 16k minimum sizes, using FastAlloc.  All calling paths to PacketBuffer creation now pass a size hint if known.  P2PNetworkTest improved in many ways, errors go to TraceEvents instead of stdout, error counts are reported in stats, range min/max parameters are combined into "min:max" strings, new options to "stutter" connections by delaying randomly before socket read or write, message size to send is now configured separately for incoming vs outgoing sessions.
2020-06-25 20:44:43 -07:00
Steve Atherton 813dbfb297 TLS handshake threads are now created with TLS initialization instead of when the network is created since they may not be needed and it avoids calling startThread() with a custom stack size too early in process execution. StartThread() now logs a warning if the given stack size can't be used. Reorganized TLS handshake thread state near the other TLS related stuff. 2020-06-23 03:09:56 -07:00
Steve Atherton d36f64bd09 Track session completions instead of session starts. 2020-06-22 15:40:04 -07:00
Steve Atherton a48d005f61 Bug fixes, stats improvements. 2020-06-22 13:37:13 -07:00
Steve Atherton 81b8dc30f5 Network test bug fixes. TLS still not working for unknown reason, seems to be related to initialization of something. 2020-06-22 05:15:24 -07:00
Steve Atherton 57344922a4 Added a network connection test and very hacky interface to it. The test simultaneously listens on a set of addresses, connects to a random set of addresses to maintain a configured number of connections, and for each session executes a two way data exchange followed by a random delay and close. 2020-06-22 03:37:16 -07:00
Andrew Noyes c3b67c0c63 Fix OPEN_FOR_IDE build 2020-03-03 11:32:43 -08:00
Russell Sears 956a3efa80 Pull request comments 2020-02-19 10:55:05 -08:00
Russell Sears 7724c644e5 Add some tuning knobs to networktestclient; also, measure latency directly. 2020-02-13 13:11:54 -08:00
Alex Miller 49c623826f Make the networktest payload size a knob so that it can be changed. 2019-08-21 18:37:50 -07:00
Alex Miller 7a500cd37f A giant translation of TaskFooPriority -> TaskPriority::Foo
This is so that APIs that take priorities don't take ints, which are
common and easy to accidentally pass the wrong thing.
2019-06-25 02:47:35 -07:00
A.J. Beamon 5f55f3f613 Replace g_random and g_nondeterministic_random with functions deterministicRandom() and nondeterministicRandom() that return thread_local random number generators. Delete g_debug_random and trace_random. Allow only deterministicRandom() to be seeded, and require it to be seeded from each thread on which it is used. 2019-05-10 14:01:52 -07:00
Andrew Noyes 13ba915a19 Fix more unused variable warnings 2019-04-17 15:38:08 -07:00
Vishesh Yadav 43e5a46f9b Change Endpoint::address(NetworkAddress) to vector<NetworkAddress>
Extend `Endpoint` class to take multiple NetworkAddresses instead of
just one. Hence, to talk to an endpoint instead of one IP:PORT, we'll
have multiple IP:PORT pairs.

This patch simply adds the field and makes changes to compile the
codebase. The first element of of `address` field is used everywhere.
Hence the way we talk to remains same with this patch.

NOTE:

Directly accessing the first memeber of Endpoint::address is unsafe
as Endpoint() doesn't enforces non-empty address list. However, since
the correctness test pass for now and are anyway replacing all those
unsafe accesses with ones considering the whole vector, this patch
ignores to access them in safe way.
2018-12-13 13:36:52 -08:00
Robert Escriva 268093a96d Adjust all includes to be relative to the root.
Remove the use of relative paths.  A header at foo/bar.h could be included by
files under foo/ with "bar.h", but would be included everywhere else as
"foo/bar.h".  Adjust so that every include references such a header with the
latter form.

Signed-off-by: Robert Escriva <rescriva@dropbox.com>
2018-10-19 17:35:33 +00:00
Stephen Atherton 2fc86c5ff3 Merge branch 'master' of github.com:apple/foundationdb into feature-redwood
# Conflicts:
#	fdbrpc/AsyncFileCached.actor.h
#	fdbserver/IKeyValueStore.h
#	fdbserver/KeyValueStoreMemory.actor.cpp
#	fdbserver/workloads/StatusWorkload.actor.cpp
#	tests/fast/SidebandWithStatus.txt
#	tests/rare/LargeApiCorrectnessStatus.txt
#	tests/slow/DDBalanceAndRemoveStatus.txt
2018-09-20 03:39:55 -07:00
Alex Miller fb31a6999f Rewrite all files to have #include actorcompiler.h as the last include. 2018-08-14 15:50:26 -07:00
Alex Miller 535b5701e5 Rewrite all `Void _ = wait(...)` -> `wait(...)`.
This takes advantage of the new actorcompiler functionality to avoid
having duplicate definitions of `Void _` when trying to feed the
un-actorompiled source through clang.
2018-08-14 15:50:26 -07:00
Alex Miller 20082e3228 Clang fixes. 2018-04-12 11:10:53 -07:00
Alec Grieser 0bae9880f1 remove trailing whitespace from our copyright headers ; fixed formatting of python setup.py 2018-02-21 10:25:11 -08:00
FDB Dev Team a674cb4ef4 Initial repository commit 2017-05-25 13:48:44 -07:00