Support Center

Reindex operations are deadlocking with user processes

Last Updated: Oct 23, 2015 06:43AM CDT
There is no built-in deadlock handling in MR and reindex statements themselves don't have any way to naturally handle this either.  That said, MR does allow you to control deadlocking behavior by your reindex statements.  The new features listed below were released in Minion Reindex 1.2 on 10/22/2015.
 
  1. Statement Prefix – All of the Settings tables now have a StmtPrefix column.  This column allows you to prefix every reindex statement with a statement of your own.  This is different from the table pre/post code because it is run in the same context whereas pre/post code is run as a completely separate statement in a different context.  The StmtPrefix column is meant to run statements that have to be run in the same context as the reindex statement.  A really good example use case for this is the need to ensure that your reindex statement is chosen as the deadlock victim should a deadlock occur.  In this case you would set StmtPrefix to “SET DEADLOCK_PRIORITY LOW;”.  Or you could set a lock timeout, or use this setting to add a time delay to every reindex statement if you like.  The StmtPrefix you choose will be shown as part of the Cmd column in the IndexMaintLogDetails table. To ensure that your statements run properly, you must end the code in this column with a semi-colon.
  2. Statement Suffix – All of the Settings tables now have a StmtSuffix column.  This column allows you to suffix every reindex statement with a statement of your own.  This is different from the table pre/post code because it is run in the same context whereas pre/post code is run as a completely separate statement in a different context.  The StmtSuffix column is meant to run statements that have to be run in the same context as the reindex statement.  This could be used to undo something that you did in the StmtSuffix.  For example, you could turn trace flags on and off.  You could also use this setting to add a time delay to every reindex statement if you like.  The StmtSuffix you choose will be shown as part of the Cmd column in the IndexMaintLogDetails table.  To ensure that your statements run properly, you must end the code in this column with a semi-colon.
 
 
556ca399015f31edc97a62de2771be1a@minionware.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete