TreeSet::addAll);
Transaction modeshapeTx = repositoryEnvironment.getTransactions().currentTransaction();
assert modeshapeTx != null;
String txId = modeshapeTx.id();
Set<String> lockedKeysForTx = LOCKED_KEYS_BY_TX_ID.computeIfAbsent(txId, id -> new LinkedHashSet<>());
<BUG>if (keysToLock.removeAll(lockedKeysForTx)) {
if (LOGGER.isDebugEnabled()) {</BUG>
LOGGER.debug("The keys {0} have been locked previously as part of the transaction {1}; skipping them...",
<BUG>lockedKeysForTx, txId);
}
}
if (keysToLock.isEmpty()) {
return;
}</BUG>
int retryCountOnLockTimeout = 3;

TreeSet::addAll);
Transaction modeshapeTx = repositoryEnvironment.getTransactions().currentTransaction();
assert modeshapeTx != null;
String txId = modeshapeTx.id();
Set<String> lockedKeysForTx = LOCKED_KEYS_BY_TX_ID.computeIfAbsent(txId, id -> new LinkedHashSet<>());
if (lockedKeysForTx.containsAll(changedNodesKeys)) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("The keys {0} have been locked previously as part of the transaction {1}; skipping them...",
changedNodesKeys, txId);
}
} else {
Set<String> newKeysToLock = new TreeSet<>(changedNodesKeys);
newKeysToLock.removeAll(lockedKeysForTx);
int retryCountOnLockTimeout = 3;
