MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / commitTransaction

Method commitTransaction

src/jrd/replication/Replicator.cpp:200–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void Replicator::commitTransaction(CheckStatusWrapper* status, Transaction* transaction)
201{
202 try
203 {
204 auto& txnData = transaction->getData();
205
206 // Assert this transaction being de-facto dirty
207 const auto dataLength = txnData.buffer->getCount() - sizeof(Block);
208 fb_assert(txnData.flushes || dataLength > sizeof(UCHAR));
209
210 txnData.putGenerators(m_generators);
211 m_generators.clear();
212
213 txnData.putTag(opCommitTransaction);
214 flush(txnData, FLUSH_SYNC, BLOCK_END_TRANS);
215 }
216 catch (const Exception& ex)
217 {
218 ex.stuffException(status);
219 }
220}
221
222void Replicator::rollbackTransaction(CheckStatusWrapper* status, Transaction* transaction)
223{

Callers

nothing calls this directly

Calls 6

putGeneratorsMethod · 0.80
putTagMethod · 0.80
getDataMethod · 0.45
getCountMethod · 0.45
clearMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected