feat: support commit metrics of FileStoreCommitImpl to align with CommitMetrics#66
Merged
lxy-9602 merged 1 commit intoalibaba:mainfrom Jan 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive commit metrics support to FileStoreCommitImpl to align with the Java implementation's CommitMetrics. The changes introduce metric tracking for commit duration, file counts, record counts, and compaction statistics.
Changes:
- Added 14 new metric constant definitions in
CommitMetricsclass - Extended
CollectChangesmethod to collect changelog and compact files separately - Implemented three helper methods for metric calculations:
RowCounts,NumChangedPartitions, andNumChangedBuckets
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/paimon/core/operation/metrics/commit_metrics.h | Added metric name constants for tracking commit duration, file operations, record counts, and compaction metrics |
| src/paimon/core/operation/file_store_commit_impl.h | Extended CollectChanges signature and added helper method declarations for metrics calculation |
| src/paimon/core/operation/file_store_commit_impl.cpp | Implemented metrics collection in Commit method, extended CollectChanges to handle all file types, and added helper methods for calculating row counts and changed partitions/buckets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aab656b to
d2781fa
Compare
Contributor
Author
|
Ping @lucasfang, @lxy-9602. |
zjw1111
reviewed
Jan 21, 2026
38606e4 to
cd6ed7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #65
Support commit metrics of
FileStoreCommitImplto align withCommitMetricsincluding:lastCommitDurationlastCommitAttemptslastTableFilesAddedlastTableFilesDeletedlastTableFilesAppendedlastTableFilesCommitCompactedlastChangelogFilesAppendedlastChangelogFileCommitCompactedlastGeneratedSnapshotslastDeltaRecordsAppendedlastChangelogRecordsAppendedlastDeltaRecordsCommitCompactedlastChangelogRecordsCommitCompactedlastPartitionsWrittenlastBucketsWrittenlastCompactionInputFileSizelastCompactionOutputFileSizeTests
CI.
API and Format
No.
Documentation
No.