You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "bschuchardt (GitHub)" <gi...@apache.org> on 2018/11/20 22:11:55 UTC

[GitHub] [geode] bschuchardt opened pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

The Protobuf API now disallows access to internal cache regions



Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

- [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?

- [x] Is your initial contribution a single, squashed commit?

- [x] Does `gradlew build` run cleanly?

- [x] Have you written or updated unit tests to verify your changes?

- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.


[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] bschuchardt commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "bschuchardt (GitHub)" <gi...@apache.org>.
Yeah, I was surprised by that too. My PR isn't related to making the driver behave better.  It's only about restricting access to internal regions.

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] bschuchardt commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "bschuchardt (GitHub)" <gi...@apache.org>.
I see - thanks, I'll fix that

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "agingade (GitHub)" <gi...@apache.org>.
May be design related; i was expecting driver.getRegion() to be throwing exception; as client can not perform any operation on the returned region reference.

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "agingade (GitHub)" <gi...@apache.org>.
A small change, to be consistent: 
If this is to make it internal region; can we use internalRegionArguments.setInternalRegion()...If not can we make the following RegionShortcut to use PARTITIONED instead of REPLICATE. 

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] bschuchardt closed pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "bschuchardt (GitHub)" <gi...@apache.org>.
[ pull request closed by bschuchardt ]

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] bschuchardt commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "bschuchardt (GitHub)" <gi...@apache.org>.
That approach of using setInternalRegion(), unfortunately, does not create a Region that is marked as an "internal region".  I tried that and it doesn't work.
I don't think it should be marked as PARTITIONED because PR admin regions aren't partitioned.

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "agingade (GitHub)" <gi...@apache.org>.
Works for me.

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "agingade (GitHub)" <gi...@apache.org>.
this.cache? instead of cache....

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "agingade (GitHub)" <gi...@apache.org>.
The question was about passing the cache instance to SecureFunctionServiceImpl(); line#57 since its not changed in this pr, the gui was displaying it in extreme left... 

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] bschuchardt commented on pull request #2885: GEODE-6034 Protobuf clients should not access or modify internal regions

Posted by "bschuchardt (GitHub)" <gi...@apache.org>.
I'm sorry but I don't understand this comment.  The SecureCacheImpl needs to hold an InternalCacheForClientAccess, so this change seems necessary.

[ Full content available at: https://github.com/apache/geode/pull/2885 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org