ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <>
Subject Review Request 36895: Cluster creates stuck at 9x% (deadlock sql exception)
Date Tue, 28 Jul 2015 19:54:06 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sumit Mohanty.

Bugs: AMBARI-12570

Repository: ambari


Similar to AMBARI-12526, Ambari installation via a blueprint on SQL Azure gets stuck somewhere
between 90% and 100% because of a SQL Database deadlock.

- We have dual X-locks on hostcomponentstate asking for U-locks when updating the CLUSTERED
- Both dual X-locks, from different transactions and different processes, are on the same
row (technically impossible) - based on the XML execution plan, we can see that the concurrent
UPDATE statements are executing on different rows due to their CLUSTERED INDEX predicate.
- In Java, Ambari has locks which prevent concurrent U- or X-locks on the same row
- Only happens on SQL Server

My best suspicion right now is that we have a key hash collision happening on this table.
That's why two processes appear to have the same lock even though they are on different rows.

Restricting row-level locking on this table will prevent locking on hash keys which could


  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0ff1aff 



Deployed a clean cluster on SQL Server and then ran 10+ deployments on SQL Azure without seeing
a deadlock.


Jonathan Hurley

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message