private void applyVersionTag(InternalRegion region, VersionStamp stamp, VersionTag tag,
      InternalDistributedMember sender) {
    VersionSource mbr = tag.getMemberID();
    if (mbr == null) {
      mbr = sender;
    }
    mbr = region.getVersionVector().getCanonicalId(mbr);
    tag.setMemberID(mbr);
    stamp.setVersions(tag);
    if (tag.hasPreviousMemberID()) {
      if (tag.getPreviousMemberID() == null) {
        tag.setPreviousMemberID(stamp.getMemberID());
      } else {
        tag.setPreviousMemberID(
            region.getVersionVector().getCanonicalId(tag.getPreviousMemberID()));
      }
    }
  }
This performs a concurrency check.

This check compares the version number first, followed by the member ID.

Wraparound of the version number is detected and handled by extending the range of versions by
one bit.

The normal membership ID comparison method is used.
<p>

Note that a tag from a remote (WAN) system may be in the event. If this is the case this method
will either invoke a user plugin that allows/disallows the event (and may modify the value) or
it determines whether to allow or disallow the event based on timestamps and
distributedSystemIDs.

@throws ConcurrentCacheModificationException if the event conflicts with an event that has
        already been applied to the entry.
geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java