Title: Duplicate event for VM.START in the usage_event causes it to never get processed · Issue #12590 · apache/cloudstack · GitHub
Open Graph Title: Duplicate event for VM.START in the usage_event causes it to never get processed · Issue #12590 · apache/cloudstack
X Title: Duplicate event for VM.START in the usage_event causes it to never get processed · Issue #12590 · apache/cloudstack
Description: problem It was observed that in the usage_events table, two VM.START events for the same VM had the same timestamp id type account_id created count resource_id name 106 VM.START 6 2025-10-27 13:02:07 2 200 fedora 107 VM.STOP 6 2025-10-27...
Open Graph Description: problem It was observed that in the usage_events table, two VM.START events for the same VM had the same timestamp id type account_id created count resource_id name 106 VM.START 6 2025-10-27 13:02:...
X Description: problem It was observed that in the usage_events table, two VM.START events for the same VM had the same timestamp id type account_id created count resource_id name 106 VM.START 6 2025-10-27 13:02:...
Opengraph URL: https://github.com/apache/cloudstack/issues/12590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicate event for VM.START in the usage_event causes it to never get processed","articleBody":"### problem\n\nIt was observed that in the usage_events table, two VM.START events for the same VM had the same timestamp\n\n| id | type | account_id | created | count | resource_id | name |\n|----------|--------------------------|------------|----------------------|-------|-------------|--------------|\n| 106 | VM.START | 6 | 2025-10-27 13:02:07 | 2 | 200 | fedora |\n| 107 | VM.STOP | 6 | 2025-10-27 13:02:06 | 2 | 200 | fedora |\n| 108 | VM.START | 6 | 2025-10-27 13:02:07 | 2 | 200 | fedora |\n\nThis leads to exception in createVMHelperEvent and this event is never marked as processed.\n\n```\njava.sql.SQLIntegrityConstraintViolationException: Duplicate entry '66880-1-2025-10-27 13:02:07' for key 'usage_vm_instance.vm_instance_id'\n\"2025-12-22 00:06:57,536 ERROR [cloud.usage.UsageManagerImpl_EnhancerByCloudStack_ba4e5a30] (Usage-Job-1:[]) (logid:) Error saving usage instance for vm: 66880 javax.persistence.EntityExistsException: Entity already exists\"\n\n```\n\nThis causes the usage server to always start processing from this point.\n\n### versions\n\n_No response_\n\n### The steps to reproduce the bug\n\n1.\n2.\n3.\n...\n\n\n### What to do about it?\n\n_No response_","author":{"url":"https://github.com/abh1sar","@type":"Person","name":"abh1sar"},"datePublished":"2026-02-05T05:00:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/12590/cloudstack/issues/12590"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6387ca44-3dac-aab6-d6dd-3f02540c3933 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EA2:2007B4:3CEC3A:537E35:6A4D5D7C |
| html-safe-nonce | 70462cca18688f2513ebbaddbb854178dc017909b26aaf283a838e03b3221e4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUEyOjIwMDdCNDozQ0VDM0E6NTM3RTM1OjZBNEQ1RDdDIiwidmlzaXRvcl9pZCI6IjIxMzQyMDQ0NjEzMDc3NDc3MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c56002414cf3673e59909889375a81c9d5d363f40a8238d79ac8fed31927ceac |
| hovercard-subject-tag | issue:3899666625 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/12590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9907cc58225b9fcfeb5e73cfbdc410ee1fb2d5c09af2aaea30e4fa9639a057cc/apache/cloudstack/issues/12590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9907cc58225b9fcfeb5e73cfbdc410ee1fb2d5c09af2aaea30e4fa9639a057cc/apache/cloudstack/issues/12590 |
| og:image:alt | problem It was observed that in the usage_events table, two VM.START events for the same VM had the same timestamp id type account_id created count resource_id name 106 VM.START 6 2025-10-27 13:02:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abh1sar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a1443ff9733a3016431263ea73c93d8fe00c195eb4a7670ac30e7848f045441 |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3bdd3157ea1f0fd738d408eceeead721acf1dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width