Skip to content

Commit

Permalink
Add Suite
Browse files Browse the repository at this point in the history
  • Loading branch information
longvu-db committed Aug 13, 2024
1 parent 3ba54a1 commit f51d181
Show file tree
Hide file tree
Showing 3 changed files with 784 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ trait OptimisticTransactionImpl extends TransactionalWrite
assert(!committed, "Transaction already committed.")
commitStartNano = System.nanoTime()
val attemptVersion = getFirstAttemptVersion
executionObserver.preparingCommit()

// From this point onwards, newProtocolOpt should not be used.
// `newProtocol` or `protocol` should be used instead.
Expand Down Expand Up @@ -1517,6 +1518,7 @@ trait OptimisticTransactionImpl extends TransactionalWrite
allActions = DefaultRowCommitVersion
.assignIfMissing(protocol, allActions, getFirstAttemptVersion)

executionObserver.beginDoCommit()
if (readVersion < 0) {
deltaLog.createLogDirectoriesIfNotExists()
}
Expand Down Expand Up @@ -1580,6 +1582,7 @@ trait OptimisticTransactionImpl extends TransactionalWrite
numOfDomainMetadatas = numOfDomainMetadatas,
txnId = Some(txnId))

executionObserver.transactionCommitted()
recordDeltaEvent(deltaLog, DeltaLogging.DELTA_COMMIT_STATS_OPTYPE, data = stats)
(attemptVersion, postCommitSnapshot)
} catch {
Expand All @@ -1600,9 +1603,11 @@ trait OptimisticTransactionImpl extends TransactionalWrite
throw DeltaErrors.concurrentWriteException(commitInfo)
} finally {
logs.close()
executionObserver.transactionAborted()
}
case NonFatal(_) =>
recordCommitLargeFailure(e, op)
executionObserver.transactionAborted()
throw e
case _ =>
throw e
Expand Down
Loading

0 comments on commit f51d181

Please sign in to comment.