protected boolean needWriteLock(EntryEventImpl event) {
    return !(event.isOriginRemote() || event.isNetSearch() || event.getOperation().isLocal()
        || event.getOperation().isPutAll() || event.getOperation().isRemoveAll()
        || (event.isExpiration() && isEntryEvictDestroyEnabled()
            || event.isPendingSecondaryExpireDestroy()));
  }
Release the lock on the bucket that makes the bucket stay the primary during a write.
And release/remove the lockObject on the key(s)
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java