{
logBrokenObjectAndSetInconsistency("Lock exists in ITEM table but not in LOCK table. Node UUID: " + nodeId);
if (autoRepair)
{
WorkspaceStorageConnection conn = jdbcDataContainer.openConnection();
try
{
NodeData parent = (NodeData)conn.getItemData(nodeId);
PropertyData prop =
(PropertyData)conn.getItemData(parent, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
ItemType.PROPERTY);
conn.delete(prop);
prop =
(PropertyData)conn.getItemData(parent, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
ItemType.PROPERTY);
conn.delete(prop);
conn.commit();
logComment("Lock has been removed form ITEM table. Node UUID: " + nodeId);
}
catch (RepositoryException e)
{
conn.rollback();
throw e;
}
}
}
}