void createLockRequest(InternalRegion r, TXLockRequest req) {
    if (uaMods == null && entryMods.isEmpty()) {
      return;
    }
    if (TXState.logger.isDebugEnabled()) {
      TXState.logger.debug("TXRegionState.createLockRequest 1 " + r.getClass().getSimpleName()
          + " region-state=" + this);
    }
    if (r.getScope().isDistributed()) {
      // [DISTTX] Do not take lock for RR on replicates
      if (isCreatedDuringCommit()) {
        return;
      }
      DistributedRegion dr = (DistributedRegion) r;
      Set<InternalDistributedMember> advice = dr.getCacheDistributionAdvisor().adviseTX();
      if (!advice.isEmpty()) {
        otherMembers = advice; // remember for when it is time to distribute
      }
    }
    if (TXState.logger.isDebugEnabled()) {
      TXState.logger.debug("TXRegionState.createLockRequest 2");
    }
    // Bypass D-lock for Pr TX
    boolean byPassDLock = r instanceof BucketRegion;
    // BucketRegion br = (BucketRegion)r;
    // if (br.getRedundancyLevel() < 2) {
    // }
    final boolean distributedTX = !byPassDLock && r.getScope().isDistributedAck();
    if (uaMods != null || (!distributedTX && entryMods.size() > 0)) {
      // need some local locks
      TXRegionLockRequestImpl rlr = new TXRegionLockRequestImpl(r.getCache(), r);
      if (uaMods != null) {
        for (final Object o : uaMods.keySet()) {
          // add key with isEvent set to TRUE, for keep BC
          rlr.addEntryKey(o, Boolean.TRUE);
        }

      }
      if (!distributedTX && entryMods.size() > 0) {
        rlr.addEntryKeys(getLockRequestEntryKeys());
      }
      if (!rlr.isEmpty()) {
        req.addLocalRequest(rlr);
      }
    }
    if (distributedTX && entryMods.size() > 0) {
      // need some distributed locks
      TXRegionLockRequestImpl rlr = new TXRegionLockRequestImpl(r.getCache(), r);
      rlr.addEntryKeys(getLockRequestEntryKeys());
      if (!rlr.isEmpty()) {
        req.setOtherMembers(otherMembers);
        req.addDistributedRequest(rlr);
      }
    }
  }
Create a lock request on this region state and adds it to req
geode-core/src/main/java/org/apache/geode/internal/cache/TXRegionState.java