chore: retire TEST_EnableHeartBeat (#3435)

Now unit tests will run the same Hearbeat fiber like in prod.
The whole feature was redundant, with just few explicit settings of maxmemory_limit
I succeeeded to make all unit tests pass.

In addition, this change allows passing a global handler that is called by heartbeat from a single thread.
This is not used yet - preparation for the next PR to break hung up replication connections on a master.

Finally, this change has some non-functional clean-ups and warning fixes to improve code quality.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-08-03 20:17:23 +03:00 committed by GitHub
parent 82298b8122
commit c9ed3f7b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 56 additions and 100 deletions

View file

@ -29,18 +29,10 @@ using facade::MemcacheParser;
class Service : public facade::ServiceInterface {
public:
struct InitOpts {
bool disable_time_update;
InitOpts() : disable_time_update{false} {
}
};
explicit Service(util::ProactorPool* pp);
~Service();
void Init(util::AcceptServer* acceptor, std::vector<facade::Listener*> listeners,
const InitOpts& opts = InitOpts{});
void Init(util::AcceptServer* acceptor, std::vector<facade::Listener*> listeners);
void Shutdown();
@ -93,7 +85,7 @@ class Service : public facade::ServiceInterface {
GlobalState GetGlobalState() const;
void ConfigureHttpHandlers(util::HttpListenerBase* base, bool is_privileged) final;
void OnClose(facade::ConnectionContext* cntx) final;
void OnConnectionClose(facade::ConnectionContext* cntx) final;
Service::ContextInfo GetContextInfo(facade::ConnectionContext* cntx) const final;