Skip to content

Commit e489993

Browse files
committed
Change libdtm according to README.
1 parent fa358a6 commit e489993

File tree

4 files changed

+500
-362
lines changed

4 files changed

+500
-362
lines changed

contrib/pg_xtm/README

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,31 @@ libdtm api
3838

3939
void DtmInitSnapshot(Snapshot snapshot);
4040

41-
// Starts new global transaction
42-
TransactionId DtmGlobalStartTransaction(int nParticipants, Snapshot shaposhot);
41+
// Starts a new global transaction of nParticipants size. Returns the
42+
// transaction id and fills the snapshot on success. Returns INVALID_XID
43+
// otherwise.
44+
TransactionId DtmGlobalStartTransaction(int nParticipants, Snapshot shapshot);
4345

44-
// Get existed DTM snapshot.
46+
// Asks the DTM for a fresh snapshot.
4547
void DtmGlobalGetSnapshot(TransactionId xid, Snapshot snapshot);
4648

4749
// Commits transaction only once all participants have called this function,
48-
// does not change CLOG otherwise.
49-
void DtmGlobalSetTransStatus(TransactionId xid, XidStatus status, bool wait);
50+
// does not change CLOG otherwise. Set 'wait' to 'true' if you want this call
51+
// to return only after the transaction is considered finished by the DTM.
52+
// Returns the status on success, or -1 otherwise.
53+
XidStatus DtmGlobalSetTransStatus(TransactionId xid, XidStatus status, bool wait);
5054

5155
// Gets the status of the transaction identified by 'xid'. Returns the status
5256
// on success, or -1 otherwise. If 'wait' is true, then it does not return
5357
// until the transaction is finished.
5458
XidStatus DtmGlobalGetTransStatus(TransactionId xid, bool wait);
5559

56-
// Reserve XIDs for local transaction
57-
TransactioinId DtmGlobalReserve(int nXids);
60+
// Reserves at least 'nXids' successive xids for local transactions. The xids
61+
// reserved are not less than 'xid' in value. Returns the actual number
62+
// of xids reserved, and sets the 'first' xid accordingly. The number of xids
63+
// reserved is guaranteed to be at least nXids.
64+
// In other words, *first ≥ xid and result ≥ nXids.
65+
int DtmGlobalReserve(TransactionId xid, int nXids, TransactionId *first);
5866

5967
--------------------
6068
Backend-DTM Protocol

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy