mirror of https://github.com/citusdata/citus.git
Change BeginCoordinatedTransaction to internal linkage
It's only ever called from a single file, so having it be extern didn't make a whole lot of sense.pull/2689/head
parent
2349e8e75c
commit
1dec6c5163
|
@ -67,6 +67,7 @@ int FunctionCallLevel = 0;
|
|||
|
||||
|
||||
/* transaction management functions */
|
||||
static void BeginCoordinatedTransaction(void);
|
||||
static void CoordinatedTransactionCallback(XactEvent event, void *arg);
|
||||
static void CoordinatedSubTransactionCallback(SubXactEvent event, SubTransactionId subId,
|
||||
SubTransactionId parentSubid, void *arg);
|
||||
|
@ -78,25 +79,6 @@ static void PopSubXact(SubTransactionId subId);
|
|||
static void SwallowErrors(void (*func)());
|
||||
|
||||
|
||||
/*
|
||||
* BeginCoordinatedTransaction begins a coordinated transaction. No
|
||||
* pre-existing coordinated transaction may be in progress.
|
||||
*/
|
||||
void
|
||||
BeginCoordinatedTransaction(void)
|
||||
{
|
||||
if (CurrentCoordinatedTransactionState != COORD_TRANS_NONE &&
|
||||
CurrentCoordinatedTransactionState != COORD_TRANS_IDLE)
|
||||
{
|
||||
ereport(ERROR, (errmsg("starting transaction in wrong state")));
|
||||
}
|
||||
|
||||
CurrentCoordinatedTransactionState = COORD_TRANS_STARTED;
|
||||
|
||||
AssignDistributedTransactionId();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* BeginOrContinueCoordinatedTransaction starts a coordinated transaction,
|
||||
* unless one already is in progress.
|
||||
|
@ -156,6 +138,25 @@ InitializeTransactionManagement(void)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* BeginCoordinatedTransaction begins a coordinated transaction. No
|
||||
* pre-existing coordinated transaction may be in progress./
|
||||
*/
|
||||
static void
|
||||
BeginCoordinatedTransaction(void)
|
||||
{
|
||||
if (CurrentCoordinatedTransactionState != COORD_TRANS_NONE &&
|
||||
CurrentCoordinatedTransactionState != COORD_TRANS_IDLE)
|
||||
{
|
||||
ereport(ERROR, (errmsg("starting transaction in wrong state")));
|
||||
}
|
||||
|
||||
CurrentCoordinatedTransactionState = COORD_TRANS_STARTED;
|
||||
|
||||
AssignDistributedTransactionId();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Transaction management callback, handling coordinated transaction, and
|
||||
* transaction independent connection management.
|
||||
|
|
|
@ -89,7 +89,6 @@ extern int FunctionCallLevel;
|
|||
/*
|
||||
* Coordinated transaction management.
|
||||
*/
|
||||
extern void BeginCoordinatedTransaction(void);
|
||||
extern void BeginOrContinueCoordinatedTransaction(void);
|
||||
extern bool InCoordinatedTransaction(void);
|
||||
extern void CoordinatedTransactionUse2PC(void);
|
||||
|
|
Loading…
Reference in New Issue