Skip to content

Add root volume size column to order by clause in CloudInstanceTypeStateIngestor.php#2056

Merged
eiffel777 merged 3 commits intoubccr:mainfrom
eiffel777:add-instance-root-volume-order
Jul 8, 2025
Merged

Add root volume size column to order by clause in CloudInstanceTypeStateIngestor.php#2056
eiffel777 merged 3 commits intoubccr:mainfrom
eiffel777:add-instance-root-volume-order

Conversation

@eiffel777
Copy link
Copy Markdown
Contributor

Description

There exists a scenario that when you

  • Re-ingest cloud logs for a time period that has already been ingested.
  • The log files include new events not previous ingested for that time period
  • More than one VM with the same instance type but different root volume sizes is started at the same time

This scenario produces an Integrity Constraint Violation error on modw_cloud.instance_type.

The cause of this is multiple rows in modw_cloud.instance_type_staging that have the same resource_id, instance_type, num_cores, memory_mb, start time, and disk_gb. When the CloudInstanceTypeStateIngestor runs it uses the order of the rows to check for changes to an instance type over time. Adding the disk_gb column to the order ensures that rows with resource_id, instance_type, num_cores, memory_mb, start time, and disk_gb the same are collapsed into the same row when CloudInstanceTypeStateIngestor is run and prevents the Integrity Constraint Violation error.

Tests performed

Tested on xdmod-dev where I first ran into the issue.

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@eiffel777 eiffel777 added this to the 11.0.2 milestone Jun 27, 2025
@eiffel777 eiffel777 self-assigned this Jun 27, 2025
@eiffel777 eiffel777 added the bug Bugfixes label Jun 27, 2025
@eiffel777 eiffel777 merged commit 638071b into ubccr:main Jul 8, 2025
4 checks passed
aaronweeden pushed a commit to aaronweeden/xdmod that referenced this pull request Jul 8, 2025
…-order

Add root volume size column to order by clause in CloudInstanceTypeStateIngestor.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants