提交 7f361f5a 编写于 作者: A Ashwin Agrawal

Remove TwoPhaseFindRecoverPostCheckpointPreparedTransactionsMapEntry()

上级 29b78ef4
......@@ -246,43 +246,6 @@ add_recover_post_checkpoint_prepared_transactions_map_entry(TransactionId xid, X
} /* end add_recover_post_checkpoint_prepared_transactions_map_entry */
/*
* Find a mapping in the recover post checkpoint prepared transactions hash table.
*/
bool
TwoPhaseFindRecoverPostCheckpointPreparedTransactionsMapEntry(TransactionId xid, XLogRecPtr *m, char *caller)
{
prpt_map *entry = NULL;
bool found = false;
MemSet(m, 0, sizeof(XLogRecPtr));
/*
* The table is lazily initialised.
*/
if (crashRecoverPostCheckpointPreparedTransactions_map_ht == NULL)
{
crashRecoverPostCheckpointPreparedTransactions_map_ht
= init_hash("two phase post checkpoint prepared transactions map",
sizeof(TransactionId), /* keysize */
sizeof(prpt_map),
10 /* initialize for 10 entries */);
}
entry = hash_search(crashRecoverPostCheckpointPreparedTransactions_map_ht,
&xid,
HASH_FIND,
&found);
if (entry == NULL)
{
return false;
}
memcpy(m, &entry->xlogrecptr, sizeof(XLogRecPtr));
return true;
}
/*
* Remove a mapping from the recover post checkpoint prepared transactions hash table.
*/
......
......@@ -105,6 +105,4 @@ extern void getTwoPhasePreparedTransactionData(prepared_transaction_agg_state **
extern void SetupCheckpointPreparedTransactionList(prepared_transaction_agg_state *ptas);
extern bool TwoPhaseFindRecoverPostCheckpointPreparedTransactionsMapEntry(TransactionId xid, XLogRecPtr *m, char *caller);
#endif /* TWOPHASE_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册