MCPcopy Create free account
hub / github.com/actiontech/dtle / commitTx

Method commitTx

driver/oracle/extractor/log_miner.go:439–456  ·  view source on GitHub ↗
(txId string, endScn int64)

Source from the content-addressed store, hash-verified

437}
438
439func (lc *LogMinerTxCache) commitTx(txId string, endScn int64) {
440 if el, ok := lc.index[txId]; ok {
441 // delete tx from cache
442 lc.cache.Remove(el)
443 delete(lc.index, txId)
444
445 tx := el.Value.(*LogMinerTx)
446 tx.endScn = endScn
447 tx.oldestUncommittedScn = lc.getOldestUncommittedSCN()
448
449 if len(tx.records) != 0 {
450 lc.Handler(tx)
451 } else {
452 fmt.Printf("empty transaction %s, start scn: %d, end scn: %d\n",
453 tx.transactionId, tx.startScn, tx.endScn)
454 }
455 }
456}
457
458func (lc *LogMinerTxCache) rollbackTx(txId string, endScn int64) {
459 if el, ok := lc.index[txId]; ok {

Callers 1

LoopLogminerRecordMethod · 0.80

Calls 1

Tested by

no test coverage detected