You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by "czy006 (via GitHub)" <gi...@apache.org> on 2026/03/23 06:53:52 UTC

[PR] [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict [amoro]

czy006 opened a new pull request, #4138:
URL: https://github.com/apache/amoro/pull/4138

   Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict
   
   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://amoro.apache.org/how-to-contribute/
     2. If the PR is related to an issue in https://github.com/apache/amoro/issues, add '[AMORO-XXXX]' in your PR title, e.g., '[AMORO-XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][AMORO-XXXX] Your PR title ...'.
   -->
   
   ## Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about its use case.
     2. If you fix a bug, you can clarify why it is a bug.
     3. Use Fix/Resolve/Close #{ISSUE_NUMBER} to link this PR to its related issue
   -->
   
   When use external catalog,edit database-filter catalog properties,re-register table runtime failed
   
   `2026-03-20 16:13:34,333 ERROR [table-explorer-executor-0] [org.apache.amoro.server.table.DefaultTableService] [] - TableExplorer sync table TableIdentity{database=sl_oki_prod, tableName=payment_view__payment_case__case_log} error
   org.apache.amoro.exception.PersistenceException: java.lang.IllegalArgumentException: Metric is already been registered.
           at org.apache.amoro.exception.AmoroRuntimeException.wrap(AmoroRuntimeException.java:142) ~[amoro-common-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.persistence.PersistentBase.doAsTransaction(PersistentBase.java:96) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.DefaultTableService.syncTable(DefaultTableService.java:497) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.DefaultTableService.lambda$exploreExternalCatalog$10(DefaultTableService.java:366) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736) [?:?]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
           at java.lang.Thread.run(Thread.java:955) [?:?]
   Caused by: java.lang.IllegalArgumentException: Metric is already been registered.
           at org.apache.amoro.shade.guava32.com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[amoro-shade-guava-32-32.1.1-jre-0.7.0-incubating.jar:32.1.1-jre-0.7.0-incubating]
           at org.apache.amoro.metrics.MetricRegistry.lambda$register$1(MetricRegistry.java:86) ~[amoro-common-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at java.util.concurrent.ConcurrentHashMap.computeIfPresent(ConcurrentHashMap.java:1822) ~[?:?]
           at org.apache.amoro.metrics.MetricRegistry.register(MetricRegistry.java:77) ~[amoro-common-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.TableOptimizingMetrics.registerMetric(TableOptimizingMetrics.java:223) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.TableOptimizingMetrics.registerMetrics(TableOptimizingMetrics.java:242) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.AbstractTableMetrics.register(AbstractTableMetrics.java:57) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.paimon.PaimonTableRuntime.registerMetric(PaimonTableRuntime.java:134) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.DefaultTableService.triggerTableAdded(DefaultTableService.java:554) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at org.apache.amoro.server.table.DefaultTableService.lambda$syncTable$25(DefaultTableService.java:507) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
           at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
           at org.apache.amoro.server.persistence.PersistentBase.doAsTransaction(PersistentBase.java:91) ~[amoro-ams-0.9-SNAPSHOT.jar:0.9-SNAPSHOT]
           ... 6 more`
   
   ## Brief change log
   <!--
   Clearly describe the changes made in modules, classes, methods, etc.
   -->
   
   - triggerTableAdded must be dispose the same serverTableIdentifier tableRuntime
   - registeredMetricKeys clear and try to registerMetrics
   
   ## How was this patch tested?
   
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] Run test locally before making a pull request
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (no)
   - If yes, how is the feature documented? (not documented)
   


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict [amoro]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4138: [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict
URL: https://github.com/apache/amoro/pull/4138


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict [amoro]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #4138:
URL: https://github.com/apache/amoro/pull/4138#issuecomment-4250788258

   ## [Codecov](https://app.codecov.io/gh/apache/amoro/pull/4138?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `79.06977%` with `9 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 29.80%. Comparing base ([`b7f7de3`](https://app.codecov.io/gh/apache/amoro/commit/b7f7de31fb1815a9d022d0d76383e9f169e1f955?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b170000`](https://app.codecov.io/gh/apache/amoro/commit/b170000c56c47b73a9c5e0c0f18724189ffaf47e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/amoro/pull/4138?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...apache/amoro/server/table/DefaultTableService.java](https://app.codecov.io/gh/apache/amoro/pull/4138?src=pr&el=tree&filepath=amoro-ams%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Famoro%2Fserver%2Ftable%2FDefaultTableService.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YW1vcm8tYW1zL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9hbW9yby9zZXJ2ZXIvdGFibGUvRGVmYXVsdFRhYmxlU2VydmljZS5qYXZh) | 75.67% | [8 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/amoro/pull/4138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4138      +/-   ##
   ============================================
   + Coverage     29.75%   29.80%   +0.04%     
   - Complexity     4258     4268      +10     
   ============================================
     Files           677      677              
     Lines         54744    54791      +47     
     Branches       6968     6975       +7     
   ============================================
   + Hits          16288    16328      +40     
   - Misses        37246    37252       +6     
   - Partials       1210     1211       +1     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/amoro/pull/4138/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [core](https://app.codecov.io/gh/apache/amoro/pull/4138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `29.80% <79.06%> (+0.04%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/amoro/pull/4138?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict [amoro]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4138:
URL: https://github.com/apache/amoro/pull/4138#issuecomment-4686270505

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Hotfix] Fix Edit Catalog database-filter,After TableRuntime metric re-register conflict [amoro]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4138:
URL: https://github.com/apache/amoro/pull/4138#issuecomment-4627102842

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@amoro.apache.org list. Thank you for your contributions.


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org