Deadlock in IndexOptimize returns success
Description of the issue Index reorg statement deadlock victim causes IndexOptimize to stop instead of skipping victim statement and continuing with other reorg or rebuilds.
SQL Server version and edition Microsoft SQL Server 2016 (SP2-CU7-GDR) (KB4505222) - 13.0.5366.0 (X64) Jun 15 2019 08:22:25 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Datacenter 6.3 <X64> (Build 9600: ) (Hypervisor)
Version of the script Check the header of the stored procedure
What command are you executing? ALTER INDEX ... REORGANIZE ...
What output are you getting? I have IndexOptimize as part of weekly index maintenance. When a deadlock occurs and the currently executing ALTER INDEX REORGANIZE is the victim, the job finishes as a success, but none of the INDEX reorgs or rebuilds that follow the deadlock victim attempt to run.
Deadlock detection appears to be working properly in the current (2022-12-03) version. This issue should probably be closed.