(txId string, endScn int64)
| 437 | } |
| 438 | |
| 439 | func (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 | |
| 458 | func (lc *LogMinerTxCache) rollbackTx(txId string, endScn int64) { |
| 459 | if el, ok := lc.index[txId]; ok { |
no test coverage detected