File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,3 +175,18 @@ END$$
175175DELIMITER ;
176176CALL UpgradeApplicationDevelopmentServiceVersion();
177177DROP PROCEDURE IF EXISTS UpgradeApplicationDevelopmentServiceVersion;
178+
179+ -- ZSTAC-82069: Clean up orphan GpuDeviceSpecVO records where parent spec type is not GPU
180+ -- Root cause: ZSTAC-81489 fixed GPU detection on Agent side, but didn't handle cleanup of
181+ -- stale GpuDeviceSpecVO records when device type changed from GPU to Generic.
182+ -- GpuDeviceSpecVO is a child table of PciDeviceSpecVO using @PrimaryKeyJoinColumn inheritance.
183+ -- Only GPU-type specs should have corresponding records in GpuDeviceSpecVO.
184+ DELETE g FROM GpuDeviceSpecVO g
185+ INNER JOIN PciDeviceSpecVO p ON g .uuid = p .uuid
186+ WHERE p .type NOT IN (
187+ ' GPU_Video_Controller' ,
188+ ' GPU_3D_Controller' ,
189+ ' GPU_Processing_Accelerators' ,
190+ ' GPU_Co_Processor' ,
191+ ' GPU_Communication_Controller'
192+ );
You can’t perform that action at this time.
0 commit comments