Skip to content

Commit

Permalink
Merge pull request #646 from mronstro/24.10-main
Browse files Browse the repository at this point in the history
Fixing compilation warnings
  • Loading branch information
mronstro authored Mar 3, 2025
2 parents 0cb9047 + b04da69 commit 9004c15
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
8 changes: 7 additions & 1 deletion storage/ndb/rest-server2/server/src/ttl_purge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ void TTLPurger::SchemaWatcherJob() {
NdbEventOperation* op = nullptr;
NdbDictionary::Dictionary::List list;
const char* message_buf = "API_OK";
#ifdef DEBUG_EVENT
Uint32 event_nums = 0;
#endif
[[maybe_unused]] char event_name_buf[128];
char slock_buf_pre[32];
char slock_buf[32];
Expand Down Expand Up @@ -353,11 +355,13 @@ void TTLPurger::SchemaWatcherJob() {
op->getNdbError().message);
goto err;
}
#ifdef DEBUG_EVENT
event_nums++;
DEB_EVENT("EVENT [%u]: %s, GCI = %llu",
event_nums,
GetEventName(op->getEventType(), event_name_buf),
op->getGCI());
#endif
char* ptr_pre = nullptr;
char* ptr = nullptr;
std::string db_str_pre;
Expand Down Expand Up @@ -922,13 +926,15 @@ enum SpecialShardVal {
kShardFirst = 0
};

/*
static const uint mon_lengths[2][MONS_PER_YEAR] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
static const uint year_lengths[2] = {DAYS_PER_NYEAR, DAYS_PER_LYEAR};
*/
static const uint mon_starts[2][MONS_PER_YEAR] = {
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}};
static const uint year_lengths[2] = {DAYS_PER_NYEAR, DAYS_PER_LYEAR};
#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
static my_time_t sec_since_epoch(int year, int mon, int mday, int hour, int min,
int sec) {
Expand Down
2 changes: 1 addition & 1 deletion storage/ndb/rest-server2/server/src/ttl_purge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class TTLPurger {
Ndb* worker_ndb_;
std::atomic<bool> exit_;

typedef struct {
typedef struct TTLInfo {
Int32 table_id;
Uint32 ttl_sec;
Uint32 col_no;
Expand Down
4 changes: 2 additions & 2 deletions storage/ndb/src/rondis/include/dispatch_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// of patent rights can be found in the PATENTS file in the same directory.

/*
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down Expand Up @@ -70,7 +70,7 @@ class DispatchThread : public ServerThread {
int queue_limit,
const ServerHandle* handle);

virtual ~DispatchThread();
virtual ~DispatchThread() override;

virtual int StartThread() override;

Expand Down
2 changes: 1 addition & 1 deletion storage/ndb/src/rondis/include/pink_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// of patent rights can be found in the PATENTS file in the same directory.

/*
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down
4 changes: 2 additions & 2 deletions storage/ndb/src/rondis/include/redis_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// of patent rights can be found in the PATENTS file in the same directory.

/*
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down Expand Up @@ -56,7 +56,7 @@ class RedisConn: public PinkConn {
PinkEpoll* pink_epoll = nullptr,
const HandleType& handle_type = kSynchronous,
const int rbuf_max_len = REDIS_MAX_MESSAGE);
virtual ~RedisConn();
virtual ~RedisConn() override;

virtual ReadStatus GetRequest() override;
virtual WriteStatus SendReply() override;
Expand Down
2 changes: 1 addition & 1 deletion storage/ndb/src/rondis/include/rondis_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RondisConn : public pink::RedisConn
const std::string &ip_port,
pink::Thread *thread,
void *worker_specific_data);
virtual ~RondisConn() = default;
virtual ~RondisConn() override = default;

protected:
int DealMessage(const pink::RedisCmdArgsType &argv, std::string *response) override;
Expand Down
7 changes: 2 additions & 5 deletions storage/ndb/src/rondis/include/server_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// of patent rights can be found in the PATENTS file in the same directory.

/*
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down Expand Up @@ -179,7 +179,7 @@ class ServerThread : public Thread {
virtual void SetQueueLimit([[maybe_unused]]/*todo remove?*/
int queue_limit) { }

virtual ~ServerThread();
virtual ~ServerThread() override;

protected:
/*
Expand Down Expand Up @@ -251,14 +251,11 @@ extern ServerThread *NewHolyThread(
* This type Dispatch thread just get Connection and then Dispatch the fd to
* worker thread
*
* @brief
*
* @param port the port number
* @param conn_factory connection factory object
* @param cron_interval the cron job interval
* @param queue_limit the size limit of workers' connection queue
* @param handle the server's handle (e.g. CronHandle, AccessHandle...)
* @param ehandle the worker's enviroment setting handle
*/
extern ServerThread *NewDispatchThread(
int port,
Expand Down
4 changes: 2 additions & 2 deletions storage/ndb/src/rondis/include/worker_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// of patent rights can be found in the PATENTS file in the same directory.

/*
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down Expand Up @@ -59,7 +59,7 @@ class WorkerThread : public Thread {
explicit WorkerThread(ConnFactory *conn_factory, ServerThread* server_thread,
int queue_limit_, int cron_interval = 0);

virtual ~WorkerThread();
virtual ~WorkerThread() override;

void set_keepalive_timeout(int timeout) {
keepalive_timeout_ = timeout;
Expand Down

0 comments on commit 9004c15

Please sign in to comment.