You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "junmuz (via GitHub)" <gi...@apache.org> on 2026/04/02 14:13:57 UTC
[PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
junmuz opened a new pull request, #7589:
URL: https://github.com/apache/paimon/pull/7589
### Purpose
- Add lastCommittedSnapshotId gauge to commit metrics, exposing the snapshot ID produced by the most recent commit (defaults to -1 before any commit)
- Capture the snapshot ID directly from FileStoreCommitImpl after successful commit, avoiding race conditions with concurrent writers
- Document lastScannedSnapshotId and lastCommittedSnapshotId in the metrics reference page
### Tests
New test cases have been added.
- CommitStatsTest verifies lastCommittedSnapshotId is correctly stored for empty, non-empty, and compaction commits
- CommitMetricsTest verifies the gauge registers with default -1, then updates correctly across multiple report cycles
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on PR #7589:
URL: https://github.com/apache/paimon/pull/7589#issuecomment-4179445068
@JingsongLi Can I get a review please.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #7589:
URL: https://github.com/apache/paimon/pull/7589#issuecomment-4527170689
Please rebase master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on code in PR #7589:
URL: https://github.com/apache/paimon/pull/7589#discussion_r3029451972
##########
docs/content/maintenance/metrics.md:
##########
@@ -62,6 +62,11 @@ Below is lists of Paimon built-in metrics. They are summarized into types of sca
<td>Histogram</td>
<td>Distributions of the time taken by the last few scans.</td>
</tr>
+ <tr>
+ <td>lastScannedSnapshotId</td>
Review Comment:
This metric has been added previously, but the docs doesn't reference it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #7589:
URL: https://github.com/apache/paimon/pull/7589
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on PR #7589:
URL: https://github.com/apache/paimon/pull/7589#issuecomment-4334744548
> @JingsongLi @XiaoHongbo-Hope I have rebased the branch and resolved the conflicts. Can I get a review over it? Thanks.
sure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on PR #7589:
URL: https://github.com/apache/paimon/pull/7589#issuecomment-4543931440
@JingsongLi The branch has been rebased, can you review it again?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on PR #7589:
URL: https://github.com/apache/paimon/pull/7589#issuecomment-4334700739
@JingsongLi @XiaoHongbo-Hope I have rebased the branch and resolved the conflicts. Can I get a review over it? Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on code in PR #7589:
URL: https://github.com/apache/paimon/pull/7589#discussion_r3153934313
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1045,6 +1050,7 @@ CommitResult tryCommitOnce(
if (strictModeChecker != null) {
strictModeChecker.update(newSnapshotId);
}
+ lastCommittedSnapshotId = newSnapshotId;
Review Comment:
This misses the duplicate-success retry path. In false-success retry, the earlier duplicate-check branch returns before this assignment, so the gauge can stay `-1`.Should we also set `lastCommittedSnapshotId = snapshot.id()` there?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add lastCommittedSnapshotId commit metric and document missing metrics [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on code in PR #7589:
URL: https://github.com/apache/paimon/pull/7589#discussion_r3155680724
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1045,6 +1050,7 @@ CommitResult tryCommitOnce(
if (strictModeChecker != null) {
strictModeChecker.update(newSnapshotId);
}
+ lastCommittedSnapshotId = newSnapshotId;
Review Comment:
Good catch, I have made changes to handle that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org