mirror of https://github.com/citusdata/citus.git
parent
f1b550948f
commit
d3f358ed77
|
@ -42,12 +42,6 @@
|
|||
#include "distributed/time_constants.h"
|
||||
#include "distributed/version_compat.h"
|
||||
#include "distributed/worker_log_messages.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "pg_config.h"
|
||||
#include "portability/instr_time.h"
|
||||
#include "storage/ipc.h"
|
||||
#include "utils/hsearch.h"
|
||||
#include "utils/memutils.h"
|
||||
|
||||
|
||||
int NodeConnectionTimeout = 30000;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "postgres.h"
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "math.h"
|
||||
#include "miscadmin.h"
|
||||
#include "pgstat.h"
|
||||
|
||||
|
@ -32,10 +33,8 @@
|
|||
#include "distributed/placement_connection.h"
|
||||
#include "distributed/shared_connection_stats.h"
|
||||
#include "distributed/time_constants.h"
|
||||
#include "distributed/worker_manager.h"
|
||||
#include "distributed/tuplestore.h"
|
||||
#include "distributed/worker_manager.h"
|
||||
#include "math.h"
|
||||
|
||||
#define REMOTE_CONNECTION_STATS_COLUMNS 4
|
||||
|
||||
|
@ -163,7 +162,6 @@ static void DecrementSharedConnectionCounterInternal(uint32 externalFlags, const
|
|||
|
||||
PG_FUNCTION_INFO_V1(citus_remote_connection_stats);
|
||||
|
||||
|
||||
/*
|
||||
* citus_remote_connection_stats returns all the avaliable information about all
|
||||
* the remote connections (a.k.a., connections to remote nodes).
|
||||
|
@ -964,8 +962,7 @@ SharedWorkerNodeDatabaseHashHash(const void *key, Size keysize)
|
|||
{
|
||||
SharedWorkerNodeDatabaseConnStatsHashKey *entry =
|
||||
(SharedWorkerNodeDatabaseConnStatsHashKey *) key;
|
||||
uint32 hash = string_hash(entry->workerNodeKey.hostname, NAMEDATALEN);
|
||||
hash = hash_combine(hash, hash_uint32(entry->workerNodeKey.port));
|
||||
uint32 hash = SharedConnectionHashHash(&(entry->workerNodeKey), keysize);
|
||||
hash = hash_combine(hash, hash_uint32(entry->database));
|
||||
|
||||
return hash;
|
||||
|
@ -991,9 +988,9 @@ SharedWorkerNodeDatabaseHashCompare(const void *a, const void *b, Size keysize)
|
|||
SharedWorkerNodeDatabaseConnStatsHashKey *cb =
|
||||
(SharedWorkerNodeDatabaseConnStatsHashKey *) b;
|
||||
|
||||
return strncmp(ca->workerNodeKey.hostname, cb->workerNodeKey.hostname,
|
||||
MAX_NODE_LENGTH) != 0 ||
|
||||
ca->workerNodeKey.port != cb->workerNodeKey.port ||
|
||||
int sharedConnectionHashCompare =
|
||||
SharedConnectionHashCompare(&(ca->workerNodeKey), &(cb->workerNodeKey), keysize);
|
||||
return sharedConnectionHashCompare ||
|
||||
ca->database != cb->database;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#include "distributed/background_jobs.h"
|
||||
#include "distributed/citus_safe_lib.h"
|
||||
#include "distributed/connection_management.h"
|
||||
#include "distributed/coordinator_protocol.h"
|
||||
#include "distributed/distributed_deadlock_detection.h"
|
||||
#include "distributed/maintenanced.h"
|
||||
|
@ -60,7 +61,6 @@
|
|||
#include "distributed/statistics_collection.h"
|
||||
#include "distributed/transaction_recovery.h"
|
||||
#include "distributed/version_compat.h"
|
||||
#include "distributed/connection_management.h"
|
||||
|
||||
/*
|
||||
* Shared memory data for all maintenance workers.
|
||||
|
|
Loading…
Reference in New Issue