TRowKey primaryRowKey = currentRowLock.getPrimary();
TRowLock primaryRowLock = getRowLock(primaryRowKey.getTableName(), primaryRowKey.getRow());
TRowKey secondaryRowKey = new TRowKey().setTableName(tableName).setRow(row);
if (!TRowLocks.isSecondaryOf(primaryRowLock, secondaryRowKey, currentRowLock)) {
throw new DanglingRowLockException(secondaryRowKey, "Primary lock doesn't have rowLock as secondary.");
}
}
}
}