Update execClusterResize.cpp

This commit is contained in:
bjyb 2023-09-26 14:08:17 +08:00
parent b074601139
commit 7758348b68
1 changed files with 25 additions and 0 deletions

View File

@ -69,6 +69,31 @@ static inline bool redis_offset_retrive_function(const char* funcname, Oid retty
((nargs) == 4 && (rettype) == TIDOID && (argstype)[0] == TEXTOID && (argstype)[1] == NAMEOID && \
(argstype)[2] == INT4OID && (argstype)[3] == INT4OID))
/*The function of this code is to implement some functions related to Redis. Specifically includes the following aspects:
1. Some macros are defined to specify some constants.
2. Some inline functions are declared to judge whether a function is a corresponding Redis function.
3. Some functions are implemented, including recording deleted tuples, judging whether the relationship is in cluster
redistribution, checking whether the table is a deletion operation table, and judging whether the process is in the process of cluster redistribution.
The function RecordDeletedTuple is used to record the tupleid of a given tuple into the `pg _ delete _ delta` table. As follows:
-parameters:
-`Relid`: OID of the target relationship of the update/delete operation.
-`bucket id`: ID of the bucket where the target tuple is located.
-`tupleid': the tupleid to be recorded.
-`deldelta_rel: the corresponding `pg _ delete _ delta` relationship.
The function RelationInClusterResizing' is used to determine whether the relationship is in the operation of cluster resizing.
The function `relationinclusteresinggreadonly` is used to determine whether the relationship is in a read-only cluster resizing operation.
The function `relationinclusteresizingendachup' is used to determine whether the relationship is in an operation (write error) before the end of cluster resizing.
The function CheckRangeVarInRedistribution' is used to check whether the relationship is in redistribution through the relationship variable.
The function RelationIsDeleteDeltaTable is used to determine whether the given table name is a delete_delta table.
The function `clusterSizingProgress' is used to determine whether the cluster resizing process is in progress.*/
static inline bool redis_tupleid_retrive_function(const char* funcname, Oid rettype, const Oid* argstype, int nargs)
{