-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kernel][Metrics][PR#6] Support TransactionReport to log metrics for a Transaction operation #4037
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left some comments and asked some questions. Will review the rest of the tests later
kernel/kernel-api/src/main/java/io/delta/kernel/metrics/SnapshotMetricsResult.java
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/metrics/TransactionMetricsResult.java
Outdated
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/metrics/TransactionMetricsResult.java
Outdated
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/metrics/TransactionReport.java
Outdated
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/internal/metrics/TransactionReportImpl.java
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/internal/metrics/TransactionReportImpl.java
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/internal/metrics/TransactionMetrics.java
Outdated
Show resolved
Hide resolved
kernel/kernel-api/src/main/java/io/delta/kernel/internal/TransactionImpl.java
Outdated
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/MetricsReportTestUtils.scala
Outdated
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/MetricsReportTestUtils.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Tests are very thorough. Added some minor feedback and a question or two. Will approve once this minor feedback is implemented.
engineInfo, | ||
committedVersion, | ||
transactionMetrics, | ||
readSnapshot.getSnapshotReport(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the readSnapshot of a new table creation? is it just InitialSnapshot
? with version = -1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kernel/kernel-api/src/main/java/io/delta/kernel/internal/metrics/TransactionReportImpl.java
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/TransactionReportSuite.scala
Outdated
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/TransactionReportSuite.scala
Outdated
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/TransactionReportSuite.scala
Outdated
Show resolved
Hide resolved
...kernel-defaults/src/test/scala/io/delta/kernel/defaults/metrics/TransactionReportSuite.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Which Delta project/connector is this regarding?
Description
Adds
TransactionReport
for reporting an attempted or successful transaction.We record
TransactionReport
either after successfully committing the transaction or if an exception is thrown during the commit attempt. We only record a report for failed commit attempts. If there are failures elsewhere, such as while writing the data, they will not be reported.We also add support for serializing
TransactionReport
s in this PR.How was this patch tested?
Adds unit tests.
Does this PR introduce any user-facing changes?
No.