MCPcopy Create free account
hub / github.com/apache/cloudberry / getDistributedTransactionIdentifier

Function getDistributedTransactionIdentifier

src/backend/cdb/cdbtm.c:179–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179bool
180getDistributedTransactionIdentifier(char *id)
181{
182 Assert(MyTmGxactLocal != NULL);
183
184 if (isDtxContext() && MyTmGxact->gxid != InvalidDistributedTransactionId)
185 {
186 /*
187 * The length check here requires the identifer have a trailing
188 * NUL character.
189 */
190 dtxFormGid(id, MyTmGxact->gxid);
191 return true;
192 }
193
194 MemSet(id, 0, TMGIDSIZE);
195 return false;
196}
197
198bool
199isPreparedDtxTransaction(void)

Callers 2

Calls 2

isDtxContextFunction · 0.85
dtxFormGidFunction · 0.85

Tested by

no test coverage detected