67 Commits

Author SHA1 Message Date
Renxuan Wang
c69a07a858
Check in the new Hostname logic. (#6926)
* Revert #6655.

20220407-031010-renxuan-c101052c21da8346           compressed=True data_size=31004844 duration=4310801 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=1:04:15 sanity=False started=100047 stopped=20220407-041425 submitted=20220407-031010 timeout=5400 username=renxuan

* Revert #6271.

20220407-051532-renxuan-470f0fe6aac1c217           compressed=True data_size=30982370 duration=3491067 ended=100002 fail_fast=10 max_runs=100000 pass=100002 priority=100 remaining=0 runtime=0:59:57 sanity=False started=100141 stopped=20220407-061529 submitted=20220407-051532 timeout=5400 username=renxuan

* Revert #6266.

Remove resolving-related functionalities in connection string. Connection string will be used for storing purpose only, and non-mutable.

20220407-175119-renxuan-55d30ee1a4b42c2f           compressed=True data_size=30970443 duration=5437659 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=0:59:31 sanity=False started=100154 stopped=20220407-185050 submitted=20220407-175119 timeout=5400 username=renxuan

* Add hostname to coordinator interfaces.

* Turn on the new hostname logic.

* Add the corresponding change in config txns.

The most notable change is before calling basicLoadBalance(), we need to call tryInitializeRequestStream() to initialize request streams first.

Passed correctness tests.

* Return error when hostnames cannot be resolved in coordinators command.

* Minor fixes.
2022-04-27 21:54:13 -07:00
Renxuan Wang
e40cc8722c
A few hostname improvements. (#6825)
* Add tryResolveHostnames() in connection string.

* Add missing hostname to related interfaces.

* Do not pass RequestStream into *GetReplyFromHostname() functions.

Because we are using new RequestStream for each request anyways. Also, the passed in pointer could be nullptr, which results in seg faults.

* Add dynamic hostname resolve and reconnect intervals.

* Address comments.
2022-04-20 13:42:46 -07:00
Markus Pilman
bf956f5630 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-04-07 13:29:27 -06:00
Renxuan Wang
267c4deaee
Add tryGetReplyFromHostname() and retryGetReplyFromHostname(). (#6761)
* Add hostname to coordination interfaces.

* Add tryGetReplyFromHostname() and retryGetReplyFromHostname().

* Change tryGetReplyFromHostname() to call hostname.resolve().

* Add throw for actor_cancelled.
2022-04-06 10:47:00 -07:00
Renxuan Wang
465ff712b6
Move Hostname to its own files. (#6759)
* Change DNS cache to use std::map.

Revert commit 90c259d84e95dd35e01149c0a86bd18e82e33930, because if we use unordered_map, toString() can be inconsistent.

* Move ClientKnob::COORDINATOR_HOSTNAME_RESOLVE_DELAY to FlowKnob::HOSTNAME_RESOLVE_DELAY.

* Move Hostname to its own files.

Also, add resolve-related variables and functions in Hostname.
2022-04-04 19:04:51 -07:00
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Markus Pilman
bed799220a Addressed review comments, added test 2022-03-15 16:57:26 +01:00
Markus Pilman
8fac0081a8 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-03-09 11:00:00 +01:00
Renxuan Wang
70d723f70c Move the construction of ConnectionString in changeQuorumChecker() to coordinatorsCommitActor(). 2022-02-24 23:02:29 -08:00
Renxuan Wang
3e761aef3b Add resetConnectionString() function to ClusterConnectionString. 2022-02-24 23:02:29 -08:00
Markus Pilman
cf31e14904 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-02-23 10:29:32 +01:00
Renxuan Wang
481587a8c6 Turn on hostname logic. 2022-02-22 16:29:59 -08:00
Renxuan Wang
c29c522d3e Change ClusterConnectionString's status flag from boolean to enum.
So that when multiple threads try to resolve hostnames concurrently, we should have only one resolving and others wait on the result. Otherwise, they would add duplicated resolved results to coordinators.
2022-02-21 10:53:03 -08:00
Markus Pilman
c7899b9d39 Implemented public endpoints, started allow list 2022-02-16 18:12:03 +01:00
Renxuan Wang
f9f3735f73 Add resolveHostnamesBlocking() in ConnectionString and IClusterConnectionRecord.
Also, combine IClusterConnectionRecord::getConnectionString() and IClusterConnectionRecord::getMutableConnectionString() to IClusterConnectionRecord::getConnectionString(), and rename setConnectionString() to setAndPersistConnectionString().
2022-01-28 12:20:41 -08:00
Renxuan Wang
8c49391c51 Address comments. 2022-01-20 19:18:15 -08:00
Renxuan Wang
02f72dd377 Address comments. 2022-01-20 19:18:15 -08:00
Renxuan Wang
a6c482ee91 Add the support of using hostname in ConnectionString.
This PR comes without simulation tests except some unit tests. The simulation tests will be in the PR that uses hostname in code logic.
2022-01-20 19:18:15 -08:00
Renxuan Wang
f503ba6a7c Move getConnectionString() to IClusterConnectionRecord.
ClusterConnectionString was moved to IClusterConnectionRecord in PR #5853.
2021-10-27 12:59:52 -07:00
Renxuan Wang
0e094ef727 Move ClusterConnectionString to IClusterConnectionRecord. 2021-10-25 19:39:39 -07:00
A.J. Beamon
9358adcf49 Address some review comments. 2021-10-22 11:05:18 -07:00
A.J. Beamon
e882eb33fc Abstract the cluster file into a cluster connection record that can be backed by something other than the filesystem. 2021-10-22 11:05:18 -07:00
Vaidas Gasiunas
16171d8252 Refactoring well-known endpoint registration
- List all well-known endpoints of FDB in a single enum
- Identify well-known endpoints by plain IDs
2021-09-21 11:05:31 -06:00
Xiaoge Su
abf73047ca Enforce std:: specifier rather than using namespace 2021-09-16 19:40:28 -07:00
sfc-gh-tclinkenbeard
54fb0cbe85 Use full generation in ConfigTransactionInterface 2021-07-18 12:23:34 -07:00
sfc-gh-tclinkenbeard
a775f92fca Merge remote-tracking branch 'origin/master' into config-db 2021-06-01 15:39:34 -07:00
sfc-gh-tclinkenbeard
6665f5cc4d Support and test restricted range reads 2021-05-29 03:58:18 -07:00
Dan Lambright
cc3175fc50 remove forwarding 2021-05-28 11:41:42 -04:00
Dan Lambright
10289ef8f1 Respond to AJs comments 2021-05-27 09:14:32 -04:00
Dan Lambright
53d0ecc2fa respond to comments made on 5/4 2021-05-27 08:08:07 -04:00
Dan Lambright
fc65154b5d forward back new coordinator 2021-05-27 08:08:07 -04:00
Dan Lambright
fcfb78162c misc cleanup for publishing 2021-05-27 08:08:07 -04:00
Dan Lambright
742c22cef2 Don't allow changing desriptor if knob is set 2021-05-27 08:08:07 -04:00
Andrew Noyes
904a39e473
Merge pull request #4667 from sfc-gh-ajbeamon/feature-mvc-monitor-protocol-version
Use fewer connections in the multi-version client
2021-04-28 14:13:17 -07:00
sfc-gh-tclinkenbeard
d6fa06afdd Add IConfigTransaction::getRange (not yet tested) 2021-04-23 11:39:26 -07:00
Andrew Noyes
8a00c6cdf8 Add -Wshift-sign-overflow
This catches the bug fixed in #4656 at compile time
2021-04-21 23:49:26 +00:00
sfc-gh-tclinkenbeard
f54f082159 Build interfaces for full config update pipeline 2021-04-16 17:58:00 -07:00
A.J. Beamon
b2d6930103 The multi-version client monitors the cluster's protocol version and only activates the client library that can connect. 2021-04-15 11:45:14 -07:00
sfc-gh-tclinkenbeard
18f17a4ea2 First draft of config-db 2021-04-14 22:06:37 -07:00
FDB Formatster
df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Richard Chen
76d0027fa2 merge anoyes/stable-interface and add back in isCompatible 2020-10-12 18:18:30 +00:00
Young Liu
35bef73a1c Rename proxy to commit proxy 2020-09-10 17:44:15 -07:00
Andrew Noyes
f470ba8316 Remove using namespace std::rel_ops
This causes the following to not compile anymore

\#include <utility>
\#include <vector>

using namespace std::rel_ops;

int main() {
    std::vector<int> xs;
    return xs.rbegin() != xs.rend();
}

See https://godbolt.org/z/s1977n
2020-07-10 22:58:15 +00:00
Evan Tschannen
048201717c Fixed a number of problems with monitorLeaderRemotely 2020-05-10 14:20:50 -07:00
Alex Miller
43a63452d8 YOLO at reducing TLS connection count via doing monitorLeader on coordinators 2020-05-01 14:40:21 -07:00
Evan Tschannen
9b4f7626bb cache the serialization of clientDBInfo 2019-09-11 15:19:42 -07:00
Evan Tschannen
ee92f0574f fix: lastRequestTime was not updated
fix: COORDINATOR_REGISTER_INTERVAL was not set
fixed review comments
2019-07-26 13:23:56 -07:00
Evan Tschannen
be5d144b8b added status information on connected clients 2019-07-25 17:15:31 -07:00
Evan Tschannen
4a866290b7 Clients keep a persistent connection open with coordinators to get updates to the list of proxies
Status still needs to be updated with client information with information from the coordinators
2019-07-23 19:22:44 -07:00
mpilman
6afce01744 Implementation complete (not yet working) 2019-05-13 14:15:22 -07:00