mirror of https://github.com/citusdata/citus.git
Rename methods
parent
6d55154529
commit
213b15071b
|
@ -146,7 +146,7 @@ worker_split_shard_replication_setup(PG_FUNCTION_ARGS)
|
||||||
ShardInfoHashMap);
|
ShardInfoHashMap);
|
||||||
|
|
||||||
/* store handle in statically allocated shared memory*/
|
/* store handle in statically allocated shared memory*/
|
||||||
StoreSharedMemoryHandle(dsmHandle);
|
StoreShardSplitSharedMemoryHandle(dsmHandle);
|
||||||
|
|
||||||
PG_RETURN_VOID();
|
PG_RETURN_VOID();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
const char *SharedMemoryNameForHandleManagement =
|
const char *SharedMemoryNameForHandleManagement =
|
||||||
"Shard memory handle for shard split";
|
"Shared memory handle for shard split";
|
||||||
|
|
||||||
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
|
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ GetShardSplitInfoSMHeader(char *slotName)
|
||||||
errmsg("Expected slot name but found NULL")));
|
errmsg("Expected slot name but found NULL")));
|
||||||
}
|
}
|
||||||
|
|
||||||
dsm_handle dsmHandle = GetSharedMemoryHandle();
|
dsm_handle dsmHandle = GetShardSplitSharedMemoryHandle();
|
||||||
|
|
||||||
ShardSplitInfoSMHeader *shardSplitInfoSMHeader =
|
ShardSplitInfoSMHeader *shardSplitInfoSMHeader =
|
||||||
GetShardSplitInfoSMHeaderFromDSMHandle(dsmHandle);
|
GetShardSplitInfoSMHeaderFromDSMHandle(dsmHandle);
|
||||||
|
@ -242,13 +242,13 @@ ShardSplitShmemInit(void)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* StoreSharedMemoryHandle stores a handle of shared memory
|
* StoreShardSplitSharedMemoryHandle stores a handle of shared memory
|
||||||
* allocated and populated by 'worker_split_shard_replication_setup' UDF.
|
* allocated and populated by 'worker_split_shard_replication_setup' UDF.
|
||||||
* This handle is stored in a different shared memory segment with name
|
* This handle is stored in a different shared memory segment with name
|
||||||
* 'SHARED_MEMORY_FOR_SPLIT_SHARD_HANDLE_MANAGEMENT'.
|
* 'Shared memory handle for shard split'.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
StoreSharedMemoryHandle(dsm_handle dsmHandle)
|
StoreShardSplitSharedMemoryHandle(dsm_handle dsmHandle)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement,
|
ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement,
|
||||||
|
@ -289,12 +289,12 @@ StoreSharedMemoryHandle(dsm_handle dsmHandle)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetSharedMemoryHandle returns the shared memory handle stored
|
* GetShardSplitSharedMemoryHandle returns the shared memory handle stored
|
||||||
* by 'worker_split_shard_replication_setup' UDF. This handle
|
* by 'worker_split_shard_replication_setup' UDF. This handle
|
||||||
* is requested by wal sender processes during logical replication phase.
|
* is requested by wal sender processes during logical replication phase.
|
||||||
*/
|
*/
|
||||||
dsm_handle
|
dsm_handle
|
||||||
GetSharedMemoryHandle(void)
|
GetShardSplitSharedMemoryHandle(void)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement,
|
ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement,
|
||||||
|
|
|
@ -53,8 +53,8 @@ typedef struct ShardSplitShmemData
|
||||||
/* Functions for creating and accessing shared memory used for dsm handle managment */
|
/* Functions for creating and accessing shared memory used for dsm handle managment */
|
||||||
void InitializeShardSplitSMHandleManagement(void);
|
void InitializeShardSplitSMHandleManagement(void);
|
||||||
|
|
||||||
void StoreSharedMemoryHandle(dsm_handle dsmHandle);
|
void StoreShardSplitSharedMemoryHandle(dsm_handle dsmHandle);
|
||||||
dsm_handle GetSharedMemoryHandle(void);
|
dsm_handle GetShardSplitSharedMemoryHandle(void);
|
||||||
|
|
||||||
/* Functions for creating and accessing shared memory segments consisting shard split information */
|
/* Functions for creating and accessing shared memory segments consisting shard split information */
|
||||||
extern ShardSplitInfoSMHeader * CreateSharedMemoryForShardSplitInfo(int
|
extern ShardSplitInfoSMHeader * CreateSharedMemoryForShardSplitInfo(int
|
||||||
|
|
Loading…
Reference in New Issue