[
https://issues.apache.org/jira/browse/GEODE-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876939#comment-15876939
]
ASF GitHub Bot commented on GEODE-1887:
---------------------------------------
Github user kirklund commented on a diff in the pull request:
https://github.com/apache/geode/pull/390#discussion_r102340380
--- Diff:
geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
---
@@ -773,6 +755,73 @@ public void
clientIsPreventedFromConnectingToLocatorAsServer() throws Exception
}
+ private void proxyRegionClientServerOp(RegionShortcut shortcut) throws
Exception {
+ // start server first
+ final String REGION_NAME = "proxyRegionClientServerOp";
+ PORT1 = initServerCache(false);
+ // Create regions on servers.
+ server1.invoke(new SerializableCallable() {
--- End diff --
SerializableRunnable supports "public void run() throws Exception" so
there's no need to use SerializableCallable unless you need to return a type.
You also don't really need to 1st assertNotNull since c.createRegionFactory
will throw NPE:
```Java
server1.invoke(() -> {
Cache c = CacheFactory.getAnyInstance();
Region<Object, Object> r =
c.createRegionFactory(shortcut).create(REGION_NAME);
assertNotNull(r);
});
```
> Client PROXY region should delegate all operations to server
> ------------------------------------------------------------
>
> Key: GEODE-1887
> URL: https://issues.apache.org/jira/browse/GEODE-1887
> Project: Geode
> Issue Type: Bug
> Components: regions
> Reporter: Swapnil Bawaskar
> Assignee: Avinash Dongre
>
> Currently a ClientRegionShortcut.PROXY region sends operations like put() and
> get() over to the server, but for operations like size() and isEmpty() it
> just consults the local state on the client and returns 0 and true
> respectively, even though there may be data in the servers for that region.
> A PROXY region should not attempt to consult its local state for any
> operation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)