Rename CoordinatedTransactionShouldUse2PC (#4995)

pull/4970/head
SaitTalhaNisanci 2021-05-21 18:57:42 +03:00 committed by GitHub
parent 8b8f0161c3
commit a4944a2102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View File

@ -2228,7 +2228,7 @@ CitusCopyDestReceiverStartup(DestReceiver *dest, int operation,
if (cacheEntry->replicationModel == REPLICATION_MODEL_2PC ||
MultiShardCommitProtocol == COMMIT_PROTOCOL_2PC)
{
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
}
/* define how tuples will be serialised */

View File

@ -1255,7 +1255,7 @@ StartDistributedExecution(DistributedExecution *execution)
if (xactProperties->requires2PC)
{
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
}
/*
@ -3542,7 +3542,7 @@ Activate2PCIfModifyingTransactionExpandsToNewNode(WorkerSession *session)
* just opened, which means we're now going to make modifications
* over multiple connections. Activate 2PC!
*/
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
}
}

View File

@ -263,7 +263,7 @@ ExecuteLocalTaskListExtended(List *taskList,
* queries are also ReadOnly, our 2PC logic is smart enough to skip sending
* PREPARE to those connections.
*/
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
}
LogLocalCommand(task);

View File

@ -325,7 +325,7 @@ DropShards(Oid relationId, char *schemaName, char *relationName,
*/
if (MultiShardCommitProtocol == COMMIT_PROTOCOL_2PC)
{
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
}
List *dropTaskList = DropTaskList(relationId, schemaName, relationName,

View File

@ -101,7 +101,7 @@ MemoryContext CommitContext = NULL;
* do 2PC on the remote connections that did a modification.
*
* As a variable name ShouldCoordinatedTransactionUse2PC could
* be improved. We use CoordinatedTransactionShouldUse2PC() as the
* be improved. We use Use2PCForCoordinatedTransaction() as the
* public API function, hence couldn't come up with a better name
* for the underlying variable at the moment.
*/
@ -190,14 +190,14 @@ InCoordinatedTransaction(void)
/*
* CoordinatedTransactionShouldUse2PC() signals that the current coordinated
* Use2PCForCoordinatedTransaction() signals that the current coordinated
* transaction should use 2PC to commit.
*
* Note that even if 2PC is enabled, it is only used for connections that make
* modification (DML or DDL).
*/
void
CoordinatedTransactionShouldUse2PC(void)
Use2PCForCoordinatedTransaction(void)
{
Assert(InCoordinatedTransaction());

View File

@ -96,7 +96,7 @@ SendCommandToWorkerAsUser(const char *nodeName, int32 nodePort, const char *node
uint32 connectionFlags = 0;
UseCoordinatedTransaction();
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
MultiConnection *transactionConnection = GetNodeUserDatabaseConnection(
connectionFlags, nodeName,
@ -404,7 +404,7 @@ SendCommandToWorkersParamsInternal(TargetWorkerSet targetWorkerSet, const char *
List *workerNodeList = TargetWorkerSetNodeList(targetWorkerSet, ShareLock);
UseCoordinatedTransaction();
CoordinatedTransactionShouldUse2PC();
Use2PCForCoordinatedTransaction();
/* open connections in parallel */
WorkerNode *workerNode = NULL;

View File

@ -111,7 +111,7 @@ extern bool TransactionModifiedNodeMetadata;
*/
extern void UseCoordinatedTransaction(void);
extern bool InCoordinatedTransaction(void);
extern void CoordinatedTransactionShouldUse2PC(void);
extern void Use2PCForCoordinatedTransaction(void);
extern bool GetCoordinatedTransactionShouldUse2PC(void);
extern bool IsMultiStatementTransaction(void);
extern void EnsureDistributedTransactionId(void);