code: final KeyAwareLockPromise lockOrRegisterBackupLock(TxInvocationContext<?> ctx, Object key, long lockTimeout)
           throws InterruptedException {
        switch (cdl.getCacheTopology().getDistribution(key).writeOwnership()) {
           case PRIMARY:
              if (trace) {
                 getLog().tracef("Acquiring locks on %s.", toStr(key));
              }
              return checkPendingAndLockKey(ctx, key, lockTimeout);
           case BACKUP:
              if (trace) {
                 getLog().tracef("Acquiring backup locks on %s.", key);
              }
              ctx.getCacheTransaction().addBackupLockForKey(key);
           default:
              return KeyAwareLockPromise.NO_OP;
        }
     }
docs: The backup (non-primary) owners keep a "backup lock" for each key they received in a lock/prepare command.
  Normally there can be many transactions holding the backup lock at the same time, but when the secondary owner
  becomes a primary owner a new transaction trying to obtain the "real" lock will have to wait for all backup
  locks to be released. The backup lock will be released either by a commit/rollback/unlock command or by
  the originator leaving the cluster (if recovery is disabled).