Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fixes for socket shutdown #20877

Merged
merged 33 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2e9a736
Fix SSL connection retry attempts for cluster-internal connections
jsteemann Apr 30, 2024
a219cf6
apply some review comments
jsteemann Apr 30, 2024
e3f7279
check if connection was aborted
jsteemann Apr 30, 2024
71e2b5e
revert change to cmakelists for tests
jsteemann Apr 30, 2024
92fefa4
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann Apr 30, 2024
b5b50ef
disable socket rearming for now
jsteemann May 2, 2024
4b506ff
simplify PR
jsteemann May 3, 2024
2b4c53d
Merge branch 'bug-fix-3.11/socket-shutdown' of github.com:arangodb/ar…
jsteemann May 3, 2024
11928cd
remove retry entirely
jsteemann May 3, 2024
70f9050
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann May 3, 2024
0b5c67c
fix arangosh build
jsteemann May 3, 2024
178c583
Merge branch 'bug-fix-3.11/socket-shutdown' of github.com:arangodb/ar…
jsteemann May 3, 2024
243c291
Merge branch '3.11' into bug-fix-3.11/socket-shutdown
KVS85 May 3, 2024
11c2730
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann May 6, 2024
43bf56b
further fixes for socket shutdown
jsteemann May 6, 2024
8f7911b
fix ownership issue
jsteemann May 7, 2024
0bc3207
fix compiler warning
jsteemann May 7, 2024
7a31330
Merge branch '3.11' into bug-fix-3.11/socket-shutdown
jsteemann May 7, 2024
3463a1d
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann May 7, 2024
a2706fd
simplify PR
jsteemann May 7, 2024
75333f6
Merge branch 'bug-fix-3.11/socket-shutdown' of github.com:arangodb/ar…
jsteemann May 7, 2024
7039fa6
reset timer earlier
jsteemann May 7, 2024
0981766
make sure callback is always called
jsteemann May 7, 2024
a3381d3
fix timer cancelation race
jsteemann May 7, 2024
3cf96ff
fixes for socket shutdown
jsteemann May 8, 2024
5d1da43
remove invalid assertion
jsteemann May 8, 2024
27c383e
Fix: check if socket is open in connect callback
mpoeter May 8, 2024
cf2ad97
fix compilation
jsteemann May 8, 2024
52a3c69
add tests
jsteemann May 8, 2024
25cbf60
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann May 10, 2024
b8d7d33
increase connection timeout
jsteemann May 10, 2024
23bc61d
Merge branch '3.11' of github.com:arangodb/arangodb into bug-fix-3.11…
jsteemann May 10, 2024
9112003
fix spurious test failure
jsteemann May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions 3rdParty/fuerte/include/fuerte/FuerteLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
#if 0
#include <iostream>
#include <sstream>
#include <string_view>

extern void LogHackWriter(char const* p);
extern void LogHackWriter(std::string_view p);

class LogHack {
std::stringstream _s;
public:
LogHack() {};
~LogHack() { LogHackWriter(_s.str().c_str()); };
~LogHack() { LogHackWriter(_s.str()); };
template<typename T> LogHack& operator<<(T const& o) { _s << o; return *this; }
typedef std::basic_ostream<char, std::char_traits<char> > CoutType;
typedef CoutType& (*StandardEndLine)(CoutType&);
Expand Down Expand Up @@ -115,11 +116,4 @@ class LogHack {
if (0) std::cout
#endif

#if ENABLE_FUERTE_LOG_NODE > 0
#define FUERTE_LOG_NODE std::cout
#else
#define FUERTE_LOG_NODE \
if (0) std::cout
#endif

#endif
8 changes: 8 additions & 0 deletions 3rdParty/fuerte/include/fuerte/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ class ConnectionBuilder {
return *this;
}

#ifdef ARANGODB_USE_GOOGLE_TESTS
unsigned failConnectAttempts() const { return _conf._failConnectAttempts; }
ConnectionBuilder& failConnectAttempts(unsigned f) {
_conf._failConnectAttempts = f;
return *this;
}
#endif

// Set the authentication type of the connection
AuthenticationType authenticationType() const {
return _conf._authenticationType;
Expand Down
2 changes: 2 additions & 0 deletions 3rdParty/fuerte/include/fuerte/loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@

#include <fuerte/asio_ns.h>

#include <memory>
#include <mutex>
#include <thread>
#include <utility>
#include <vector>

// run / runWithWork / poll for Loop mapping to ioservice
// free function run with threads / with thread group barrier and work
Expand Down
8 changes: 7 additions & 1 deletion 3rdParty/fuerte/include/fuerte/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,13 @@ struct ConnectionConfiguration {
_host("localhost"),
_port("8529"),
_verifyHost(false),
_connectTimeout(15000),
_connectTimeout(60000),
_idleTimeout(300000),
_connectRetryPause(1000),
_maxConnectRetries(3),
#ifdef ARANGODB_USE_GOOGLE_TESTS
_failConnectAttempts(0),
#endif
_useIdleTimeout(true),
_authenticationType(AuthenticationType::None),
_user(""),
Expand All @@ -240,6 +243,9 @@ struct ConnectionConfiguration {
std::chrono::milliseconds _idleTimeout;
std::chrono::milliseconds _connectRetryPause;
unsigned _maxConnectRetries;
#ifdef ARANGODB_USE_GOOGLE_TESTS
unsigned _failConnectAttempts;
#endif
bool _useIdleTimeout;

AuthenticationType _authenticationType;
Expand Down