[GitHub] [geode] jvarenina commented on a change in pull request #5139: GEODE-8149: New parameter and property introduced
jvarenina commented on a change in pull request #5139: URL: https://github.com/apache/geode/pull/5139#discussion_r429084330 ## File path: geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java ## @@ -2032,6 +2032,23 @@ * Default: empty. All security components use basic (username/password) authentication */ String SECURITY_AUTH_TOKEN_ENABLED_COMPONENTS = SECURITY_PREFIX + "auth-token-enabled-components"; + + /** + * The static String definition of the "security-cn-auth-enabled" property + * + * + * Description This parameter only works if SSL with two-way handshake is enabled on + * all components and security manager is enabled. This property will determine if common name + * from client certificate will be used for authentication and authorization. Review comment: Thanks for the comments. I will rephrase it as you suggested. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jvarenina commented on pull request #5139: GEODE-8149: New parameter and property introduced
jvarenina commented on pull request #5139: URL: https://github.com/apache/geode/pull/5139#issuecomment-632540478 > This PR provides documentation at the Javadoc level. > Consider where in the User Guide this should be mentioned, then > > * add a User Guide explanation as part of this PR/JIRA combination, or > > * add a subticket to GEODE-8118, the parent ticket of this one (GEODE-8149) to handle the User Guide docs. > Either of the above will satisfy my concern. Thanks. OK, I will create sub-ticket to handle User Guide docs. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] lgtm-com[bot] commented on pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
lgtm-com[bot] commented on pull request #5146: URL: https://github.com/apache/geode/pull/5146#issuecomment-632547176 This pull request **fixes 1 alert** when merging 507b9db04a041a943fc28c1c6d0a1ee1e99f97fd into 358fd7067cc56b1ceb8c3d7c271c3a5254d7ee93 - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-fe5c6d77ec09fdce438b3cec609bcf5015001113) **fixed alerts:** * 1 for Dereferenced variable may be null This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] albertogpz commented on pull request #4928: GEODE-7971: Gw sender deliver TX events atomically to Gw receivers
albertogpz commented on pull request #4928: URL: https://github.com/apache/geode/pull/4928#issuecomment-632576516 > > > The problem with the doc comments was not that they were extensive, but that they got modified when you pasted the diff here and the resulting test was not a valid diff I could apply. > > > > > > I lack permissions to push my commit to your fork. It consists of four edited files. What would you suggest? > > You can send me the diff file attached to my e-mail address. I will apply the diff and then give comments if any here. I just pushed a couple of commits. - One with your comments about the documentation: I accepted all of them, thanks a lot for them. - The second one merging the latest of development. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] mivanac opened a new pull request #5148: GEODE-8172: flaky test
mivanac opened a new pull request #5148: URL: https://github.com/apache/geode/pull/5148 WIP 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: - [*] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [*] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [*] Is your initial contribution a single, squashed commit? - [*] Does `gradlew build` run cleanly? - [*] 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, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] sabbeyPivotal commented on a change in pull request #5142: GEODE-8138: Improve semantics of the redis-port option
sabbeyPivotal commented on a change in pull request #5142: URL: https://github.com/apache/geode/pull/5142#discussion_r429255221 ## File path: geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java ## @@ -1943,6 +1931,36 @@ * Default: "" */ String REDIS_PASSWORD = "redis-password"; + /** + * The static String definition of the "redis-port" property + * + * Description: Specifies the port used by Redis API for Geode which enables Redis + * clients to connect and store data in GemFire distributed system. A value of 0 will select a + * random port. + * + * Default: "6379" + * + * Allowed values: 0..65535 + */ + String REDIS_PORT = "redis-port"; + /** + * The static String definition of the "redis-service-enabled" property + * + * Description: When the default value of false, the Redis API for Geode is not available. + * Set to true to enable the Redis API for Geode. + * + * Default: false + * redis-service-enabled + * When the default value of false, the Redis API for <%=vars.product_name%> is not available. + * Set + * to true to enable the Redis API for <%=vars.product_name%>. + * S + * false + * + * + */ + String REDIS_SERVICE_ENABLED = "redis-service-enabled"; Review comment: Yeah, we can make it `redis-enabled` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jdeppe-pivotal commented on a change in pull request #5140: GEODE-8151: Convert hash commands to return RedisResponse
jdeppe-pivotal commented on a change in pull request #5140: URL: https://github.com/apache/geode/pull/5140#discussion_r429265420 ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HExistsExecutor.java ## @@ -53,12 +54,7 @@ public void executeCommand(Command command, ExecutionHandlerContext context) { RedisHash map = getRedisHash(context, key); boolean hasField = map.containsKey(field); -if (hasField) { - command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), EXISTS)); -} else { - command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_EXISTS)); -} - +return RedisResponse.integer(hasField ? EXISTS : NOT_EXISTS); Review comment: Yes, good idea. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jdeppe-pivotal commented on pull request #5145: GEODE-8168: Redis pipelined command responses can be corrupted
jdeppe-pivotal commented on pull request #5145: URL: https://github.com/apache/geode/pull/5145#issuecomment-632707135 @prettyClouds For your review... This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] alb3rtobr opened a new pull request #5149: GEODE-8108: Remove System.out.println calls from geode-redis
alb3rtobr opened a new pull request #5149: URL: https://github.com/apache/geode/pull/5149 Ticket description, reported by @dschneider-pivotal : > > I noticed in SMoveExecutor a number of System.out.println calls. This should not be done. > Either remove the calls (that is what I recommend for SMoveExecutor) or use a logger. > I don't know if SMoveExecutor is the only place this happens so a code scan should be done. `SMoveExecutor` class was already fixed but I searched for other calls to `System.out.println` in `geode-redis` and I have removed them. I also updated the logger of `GeodeRedisServer` class. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] ringles commented on a change in pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
ringles commented on a change in pull request #5146: URL: https://github.com/apache/geode/pull/5146#discussion_r429278269 ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/RegionProvider.java ## @@ -205,281 +98,27 @@ private boolean typeStoresDataInKeyRegistrar(RedisDataType type) { } public boolean removeKey(ByteArrayWrapper key, RedisDataType type, boolean cancelExpiration) { -if (type == RedisDataType.REDIS_PROTECTED) { - return false; +if (!typeStoresDataInKeyRegistrar(type)) { + keyRegistrar.unregister(key); } -Lock lock = dynamicRegionLocks.get(key); +RedisKeyCommands redisKeyCommands = new RedisKeyCommandsFunctionExecutor(dataRegion); try { - if (lock != null) { // only typeUsesDynamicRegions will have a lock -lock.lock(); - } - if (!typeStoresDataInKeyRegistrar(type)) { -keyRegistrar.unregister(key); - } - RedisKeyCommands redisKeyCommands = new RedisKeyCommandsFunctionExecutor(dataRegion); - try { -if (type == RedisDataType.REDIS_STRING) { - return stringsRegion.remove(key) != null; -} else if (type == RedisDataType.REDIS_HLL) { - return hLLRegion.remove(key) != null; -} else if (type == RedisDataType.REDIS_LIST || type == RedisDataType.REDIS_SORTEDSET) { - return destroyRegion(key, type); -} else if (type == RedisDataType.REDIS_SET || type == RedisDataType.REDIS_HASH) { - return redisKeyCommands.del(key); -} else { - return false; -} - } catch (Exception exc) { + if (type == RedisDataType.REDIS_STRING) { +return stringsRegion.remove(key) != null; + } else if (type == RedisDataType.REDIS_SET || type == RedisDataType.REDIS_HASH) { +return redisKeyCommands.del(key); + } else { return false; - } finally { -if (cancelExpiration) { - cancelKeyExpiration(key); -} else { - removeKeyExpiration(key); -} -if (lock != null) { - dynamicRegionLocks.remove(key); -} } +} catch (Exception exc) { + return false; } finally { - if (lock != null) { -lock.unlock(); - } -} - } - - public Region getOrCreateRegion(ByteArrayWrapper key, RedisDataType type, - ExecutionHandlerContext context) { -return getOrCreateRegion0(key, type, context, true); - } - - public boolean typeUsesDynamicRegions(RedisDataType type) { -return type == RedisDataType.REDIS_LIST || type == RedisDataType.REDIS_SORTEDSET; - } - - public void createRemoteRegionReferenceLocally(ByteArrayWrapper key, RedisDataType type) { -if (!typeUsesDynamicRegions(type)) { - return; -} -Region r = dynamicRegions.get(key); -if (r != null) { - return; -} -Lock lock = dynamicRegionLocks.get(key); -if (lock == null) { - Lock newLock = new ReentrantLock(); - lock = dynamicRegionLocks.putIfAbsent(key, newLock); - if (lock == null) { -lock = newLock; - } -} -boolean locked = lock.tryLock(); -// If we cannot get the lock then this remote event may have been initialized -// independently on this machine, so if we wait on the lock it is more than -// likely we will deadlock just to do the same task. This event can be ignored -if (locked) { - try { -r = cache.getRegion(key.toString()); -// If r is null, this implies that we are after a create/destroy -// simply ignore. Calls to getRegion or getOrCreate will work correctly -if (r == null) { - // TODO: one caller of this method only calls it if getRegion returned null. It was - // expecting us to create it locally. If someone else will create it locally then this - // method does not need to be called. - return; -} - -if (type == RedisDataType.REDIS_LIST) { - doInitializeList(key, r); -} else if (type == RedisDataType.REDIS_SORTEDSET) { - try { -doInitializeSortedSet(key, r); - } catch (RegionNotFoundException | IndexInvalidException e) { -// ignore - } -} -dynamicRegions.put(key, r); - } finally { -lock.unlock(); - } -} - } - - private Region getOrCreateRegion0(ByteArrayWrapper key, RedisDataType type, - ExecutionHandlerContext context, boolean addToMeta) { - -keyRegistrar.validate(key, type); -Region r = dynamicRegions.get(key); -if (r != null && r.isDestroyed()) { - removeKey(key, type); - r = null; -} -if (r == null) { - Lock lock = dynamicRegionLocks.get(key); - if (lock == null) { -Lock newLock = new ReentrantLock(); -lock = dynamicRegionLocks.putIfAbsent(key, newLock); -if (lock == null) { - lock = newLock; -} - } - - lock.lock(); -
[GitHub] [geode] bschuchardt commented on a change in pull request #5131: GEODE-8144: endpoint identification in servers is not working
bschuchardt commented on a change in pull request #5131: URL: https://github.com/apache/geode/pull/5131#discussion_r429282471 ## File path: geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java ## @@ -791,7 +792,19 @@ private boolean setServerNames(SSLParameters modifiedParams, HostAndPort addr) { return false; } -serverNames.add(new SNIHostName(addr.getHostName())); +String hostName = addr.getHostName(); +if (this.sslConfig.doEndpointIdentification() +&& InetAddressValidator.getInstance().isValid(hostName)) { + // endpoint validation typically uses a hostname in the sniServer parameter that the handshake + // will compare against the subject alternative addresses in the server's certificate. Here + // we attempt to get a hostname instead of the proffered numeric address + try { +hostName = InetAddress.getByName(hostName).getCanonicalHostName(); Review comment: @pivotal-jbarrett if you will look at the implementation of getCanonicalHostName, I think you will find that it already addresses your concerns. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] kohlmu-pivotal merged pull request #5136: GEODE-8137 - Implement loadService.
kohlmu-pivotal merged pull request #5136: URL: https://github.com/apache/geode/pull/5136 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] bschuchardt commented on a change in pull request #5131: GEODE-8144: endpoint identification in servers is not working
bschuchardt commented on a change in pull request #5131: URL: https://github.com/apache/geode/pull/5131#discussion_r429282471 ## File path: geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java ## @@ -791,7 +792,19 @@ private boolean setServerNames(SSLParameters modifiedParams, HostAndPort addr) { return false; } -serverNames.add(new SNIHostName(addr.getHostName())); +String hostName = addr.getHostName(); +if (this.sslConfig.doEndpointIdentification() +&& InetAddressValidator.getInstance().isValid(hostName)) { + // endpoint validation typically uses a hostname in the sniServer parameter that the handshake + // will compare against the subject alternative addresses in the server's certificate. Here + // we attempt to get a hostname instead of the proffered numeric address + try { +hostName = InetAddress.getByName(hostName).getCanonicalHostName(); Review comment: @pivotal-jbarrett if you will look at the implementation of getCanonicalHostName, I think you will find that it already addresses your concerns. Also, this is just setting the sniServerName field, not redirecting the socket to connect to a different address. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] bschuchardt commented on a change in pull request #5131: GEODE-8144: endpoint identification in servers is not working
bschuchardt commented on a change in pull request #5131: URL: https://github.com/apache/geode/pull/5131#discussion_r429282471 ## File path: geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java ## @@ -791,7 +792,19 @@ private boolean setServerNames(SSLParameters modifiedParams, HostAndPort addr) { return false; } -serverNames.add(new SNIHostName(addr.getHostName())); +String hostName = addr.getHostName(); +if (this.sslConfig.doEndpointIdentification() +&& InetAddressValidator.getInstance().isValid(hostName)) { + // endpoint validation typically uses a hostname in the sniServer parameter that the handshake + // will compare against the subject alternative addresses in the server's certificate. Here + // we attempt to get a hostname instead of the proffered numeric address + try { +hostName = InetAddress.getByName(hostName).getCanonicalHostName(); Review comment: @pivotal-jbarrett if you will look at the implementation of getCanonicalHostName, I think you will find that it already addresses your concerns. Also, this is just setting the sniServerName field, not redirecting the socket to connect to a different address. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] karensmolermiller commented on a change in pull request #5147: GEODE-8171: javadoc for putAll need to have accurate exception
karensmolermiller commented on a change in pull request #5147: URL: https://github.com/apache/geode/pull/5147#discussion_r429308490 ## File path: geode-core/src/main/java/org/apache/geode/cache/Region.java ## @@ -1359,10 +1359,30 @@ Object selectValue(String queryPredicate) throws FunctionDomainException, TypeMi * in the specified map. This operation will be distributed to other caches if the scope is not * Scope.LOCAL. * - * @param map the key/value pairs to put in this region. - * @since GemFire 5.0 + * If any exception is thrown due to this call, it can imply that there may have been a partial + * update performed on the region. Use putAll from within a transaction to get atomicity with all + * the + * entries. Review comment: This sentence is missing some pronouns, and the last sentence might be worded better. Here's my attempt at a rewrite: If an exception is thrown due to this call, it can imply that there may have been a partial * update performed on the region. Use putAll from within a transaction to obtain * an atomic update. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #5131: GEODE-8144: endpoint identification in servers is not working
pivotal-jbarrett commented on a change in pull request #5131: URL: https://github.com/apache/geode/pull/5131#discussion_r429315845 ## File path: geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java ## @@ -791,7 +792,19 @@ private boolean setServerNames(SSLParameters modifiedParams, HostAndPort addr) { return false; } -serverNames.add(new SNIHostName(addr.getHostName())); +String hostName = addr.getHostName(); +if (this.sslConfig.doEndpointIdentification() +&& InetAddressValidator.getInstance().isValid(hostName)) { + // endpoint validation typically uses a hostname in the sniServer parameter that the handshake + // will compare against the subject alternative addresses in the server's certificate. Here + // we attempt to get a hostname instead of the proffered numeric address + try { +hostName = InetAddress.getByName(hostName).getCanonicalHostName(); Review comment: As you mentioned offline, the same malicious entity could inject the IP into their SAN and we would validate that. I don't think this code makes anything any less secure from that standpoint so I am removing my block. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] ladyVader commented on a change in pull request #4928: GEODE-7971: Gw sender deliver TX events atomically to Gw receivers
ladyVader commented on a change in pull request #4928: URL: https://github.com/apache/geode/pull/4928#discussion_r429320060 ## File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewaySenderCommand.java ## @@ -75,6 +75,11 @@ public ResultModel createGatewaySender( mandatory = true, help = CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID__HELP) Integer remoteDistributedSystemId, + @CliOption(key = CliStrings.CREATE_GATEWAYSENDER__GROUPTRANSACTIONEVENTS, + specifiedDefaultValue = "true", + unspecifiedDefaultValue = "false", + help = CliStrings.CREATE_GATEWAYSENDER__GROUPTRANSACTIONEVENTS__HELP) boolean groupTransactionEvents, + Review comment: Thanks for both the new Exception on misconfiguring the SerialGatewaySender with groupTransactionEvents enabled + dispatcherThreads > 1. In addition, I'm no longer seeing the data inconsistencies or hangs waiting for the primary gateway sender queue to drain. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on a change in pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
dschneider-pivotal commented on a change in pull request #5146: URL: https://github.com/apache/geode/pull/5146#discussion_r429348162 ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/RegionProvider.java ## @@ -205,281 +98,27 @@ private boolean typeStoresDataInKeyRegistrar(RedisDataType type) { } public boolean removeKey(ByteArrayWrapper key, RedisDataType type, boolean cancelExpiration) { -if (type == RedisDataType.REDIS_PROTECTED) { - return false; +if (!typeStoresDataInKeyRegistrar(type)) { + keyRegistrar.unregister(key); } -Lock lock = dynamicRegionLocks.get(key); +RedisKeyCommands redisKeyCommands = new RedisKeyCommandsFunctionExecutor(dataRegion); try { - if (lock != null) { // only typeUsesDynamicRegions will have a lock -lock.lock(); - } - if (!typeStoresDataInKeyRegistrar(type)) { -keyRegistrar.unregister(key); - } - RedisKeyCommands redisKeyCommands = new RedisKeyCommandsFunctionExecutor(dataRegion); - try { -if (type == RedisDataType.REDIS_STRING) { - return stringsRegion.remove(key) != null; -} else if (type == RedisDataType.REDIS_HLL) { - return hLLRegion.remove(key) != null; -} else if (type == RedisDataType.REDIS_LIST || type == RedisDataType.REDIS_SORTEDSET) { - return destroyRegion(key, type); -} else if (type == RedisDataType.REDIS_SET || type == RedisDataType.REDIS_HASH) { - return redisKeyCommands.del(key); -} else { - return false; -} - } catch (Exception exc) { + if (type == RedisDataType.REDIS_STRING) { +return stringsRegion.remove(key) != null; + } else if (type == RedisDataType.REDIS_SET || type == RedisDataType.REDIS_HASH) { +return redisKeyCommands.del(key); + } else { return false; - } finally { -if (cancelExpiration) { - cancelKeyExpiration(key); -} else { - removeKeyExpiration(key); -} -if (lock != null) { - dynamicRegionLocks.remove(key); -} } +} catch (Exception exc) { + return false; } finally { - if (lock != null) { -lock.unlock(); - } -} - } - - public Region getOrCreateRegion(ByteArrayWrapper key, RedisDataType type, - ExecutionHandlerContext context) { -return getOrCreateRegion0(key, type, context, true); - } - - public boolean typeUsesDynamicRegions(RedisDataType type) { -return type == RedisDataType.REDIS_LIST || type == RedisDataType.REDIS_SORTEDSET; - } - - public void createRemoteRegionReferenceLocally(ByteArrayWrapper key, RedisDataType type) { -if (!typeUsesDynamicRegions(type)) { - return; -} -Region r = dynamicRegions.get(key); -if (r != null) { - return; -} -Lock lock = dynamicRegionLocks.get(key); -if (lock == null) { - Lock newLock = new ReentrantLock(); - lock = dynamicRegionLocks.putIfAbsent(key, newLock); - if (lock == null) { -lock = newLock; - } -} -boolean locked = lock.tryLock(); -// If we cannot get the lock then this remote event may have been initialized -// independently on this machine, so if we wait on the lock it is more than -// likely we will deadlock just to do the same task. This event can be ignored -if (locked) { - try { -r = cache.getRegion(key.toString()); -// If r is null, this implies that we are after a create/destroy -// simply ignore. Calls to getRegion or getOrCreate will work correctly -if (r == null) { - // TODO: one caller of this method only calls it if getRegion returned null. It was - // expecting us to create it locally. If someone else will create it locally then this - // method does not need to be called. - return; -} - -if (type == RedisDataType.REDIS_LIST) { - doInitializeList(key, r); -} else if (type == RedisDataType.REDIS_SORTEDSET) { - try { -doInitializeSortedSet(key, r); - } catch (RegionNotFoundException | IndexInvalidException e) { -// ignore - } -} -dynamicRegions.put(key, r); - } finally { -lock.unlock(); - } -} - } - - private Region getOrCreateRegion0(ByteArrayWrapper key, RedisDataType type, - ExecutionHandlerContext context, boolean addToMeta) { - -keyRegistrar.validate(key, type); -Region r = dynamicRegions.get(key); -if (r != null && r.isDestroyed()) { - removeKey(key, type); - r = null; -} -if (r == null) { - Lock lock = dynamicRegionLocks.get(key); - if (lock == null) { -Lock newLock = new ReentrantLock(); -lock = dynamicRegionLocks.putIfAbsent(key, newLock); -if (lock == null) { - lock = newLock; -} - } - - lock.
[GitHub] [geode] dschneider-pivotal commented on a change in pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
dschneider-pivotal commented on a change in pull request #5146: URL: https://github.com/apache/geode/pull/5146#discussion_r429352138 ## File path: geode-redis/src/distributedTest/java/org/apache/geode/redis/RedisDistDUnitTest.java ## @@ -209,18 +209,6 @@ public void run() throws InterruptedException { } else { jedis.del(hKey); } - } else if (n == 1) { Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on a change in pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
dschneider-pivotal commented on a change in pull request #5146: URL: https://github.com/apache/geode/pull/5146#discussion_r429352356 ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/KeyRegistrar.java ## @@ -201,11 +172,7 @@ private void throwDataTypeException(ByteArrayWrapper key, RedisData data) { } private void throwDataTypeException(ByteArrayWrapper key, RedisDataType dataType) { -if (RedisDataType.REDIS_PROTECTED.equals(dataType)) { - throw new RedisDataTypeMismatchException("The key name \"" + key + "\" is protected"); -} else { - throw new RedisDataTypeMismatchException( - RedisConstants.ERROR_WRONG_TYPE); -} +throw new RedisDataTypeMismatchException( Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] yozaner1324 closed pull request #5143: GEODE-8148 - Implement unloadModule.
yozaner1324 closed pull request #5143: URL: https://github.com/apache/geode/pull/5143 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal merged pull request #5133: GEODE-8127: ensure that function executes on primary
dschneider-pivotal merged pull request #5133: URL: https://github.com/apache/geode/pull/5133 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] yozaner1324 closed pull request #5150: GEODE-8148 - Implement unloadModule.
yozaner1324 closed pull request #5150: URL: https://github.com/apache/geode/pull/5150 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] yozaner1324 opened a new pull request #5150: GEODE-8148 - Implement unloadModule.
yozaner1324 opened a new pull request #5150: URL: https://github.com/apache/geode/pull/5150 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] 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, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] yozaner1324 opened a new pull request #5151: GEODE-8148 - Implement unloadModule.
yozaner1324 opened a new pull request #5151: URL: https://github.com/apache/geode/pull/5151 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] 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, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] gesterzhou commented on a change in pull request #5147: GEODE-8171: javadoc for putAll need to have accurate exception
gesterzhou commented on a change in pull request #5147: URL: https://github.com/apache/geode/pull/5147#discussion_r429359435 ## File path: geode-core/src/main/java/org/apache/geode/cache/Region.java ## @@ -1359,10 +1359,30 @@ Object selectValue(String queryPredicate) throws FunctionDomainException, TypeMi * in the specified map. This operation will be distributed to other caches if the scope is not * Scope.LOCAL. * - * @param map the key/value pairs to put in this region. - * @since GemFire 5.0 + * If any exception is thrown due to this call, it can imply that there may have been a partial + * update performed on the region. Use putAll from within a transaction to get atomicity with all + * the Review comment: fixed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] lgtm-com[bot] commented on pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
lgtm-com[bot] commented on pull request #5146: URL: https://github.com/apache/geode/pull/5146#issuecomment-632822841 This pull request **fixes 1 alert** when merging cda3b559858d7d35bbd24ddcb28c4208d915d2da into 358fd7067cc56b1ceb8c3d7c271c3a5254d7ee93 - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-d579b730c95f6afc1e19650da6e97af4f2cc2457) **fixed alerts:** * 1 for Dereferenced variable may be null This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] lgtm-com[bot] commented on pull request #5150: GEODE-8148 - Implement unloadModule.
lgtm-com[bot] commented on pull request #5150: URL: https://github.com/apache/geode/pull/5150#issuecomment-632827303 This pull request **introduces 1 alert** when merging 58b9b877d91e1f0fe32234c70fd1d5aa66d127e5 into e0cbd78149d520f77e896426b691c217d3afcfb4 - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-46e35a3ed5e37e301093a89a07551440884722af) **new alerts:** * 1 for Potential input resource leak This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal merged pull request #5142: GEODE-8138: Improve semantics of the redis-port option
dschneider-pivotal merged pull request #5142: URL: https://github.com/apache/geode/pull/5142 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] kohlmu-pivotal merged pull request #5151: GEODE-8148 - Implement unloadModule.
kohlmu-pivotal merged pull request #5151: URL: https://github.com/apache/geode/pull/5151 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jdeppe-pivotal merged pull request #5145: GEODE-8168: Redis pipelined command responses can be corrupted
jdeppe-pivotal merged pull request #5145: URL: https://github.com/apache/geode/pull/5145 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jdeppe-pivotal merged pull request #5140: GEODE-8151: Convert hash commands to return RedisResponse
jdeppe-pivotal merged pull request #5140: URL: https://github.com/apache/geode/pull/5140 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] jhutchison opened a new pull request #5152: Change Redis Rename Functions to Make use of Striped Executor
jhutchison opened a new pull request #5152: URL: https://github.com/apache/geode/pull/5152 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] 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, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on a change in pull request #5152: Change Redis Rename Functions to Make use of Striped Executor
dschneider-pivotal commented on a change in pull request #5152: URL: https://github.com/apache/geode/pull/5152#discussion_r429477577 ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/CommandFunction.java ## @@ -84,10 +88,32 @@ protected Object compute(Region localRegion, ByteArrayWrapper key, callable = () -> new RedisSetInRegion(localRegion).srem(key, membersToRemove); break; } - case DEL: -RedisDataType delType = (RedisDataType) args[1]; -callable = executeDel(key, localRegion, delType); + case DEL: { +callable = () -> new RedisKeyInRegion(localRegion, regionProvider).del(key); break; + } + case EXISTS: { +callable = () -> new RedisKeyInRegion(localRegion, regionProvider).exists(key); +break; + } +// case RENAME: { Review comment: remove this deadcode ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/RenameExecutor.java ## @@ -46,12 +38,22 @@ public void executeCommand(Command command, ExecutionHandlerContext context) { ByteArrayWrapper key = command.getKey(); ByteArrayWrapper newKey = new ByteArrayWrapper(commandElems.get(2)); +RedisKeyCommands +redisKeyCommands = +new RedisKeyCommandsFunctionExecutor(context.getRegionProvider().getDataRegion()); -try (@SuppressWarnings("unused") -AutoCloseableLock lockForOldKey = context.getLockService().lock(key)) { - try (@SuppressWarnings("unused") - AutoCloseableLock lockForNewKey = context.getLockService().lock(newKey)) { +List keysToLock = Arrays.asList(key,newKey); +keysToLock.sort(ByteArrayWrapper::compareTo); + + +//try (@SuppressWarnings("unused") Review comment: remove this deadcode ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/SingleResultRedisFunction.java ## @@ -40,7 +40,7 @@ public void execute(FunctionContext context) { regionFunctionContext.getLocalDataSet(regionFunctionContext.getDataSet()); Object[] args = context.getArguments(); RedisCommandType command = (RedisCommandType) args[0]; -Object result = compute(localRegion, key, command, args); +Object result = compute(regionFunctionContext.getDataSet(), key, command, args); Review comment: Why was this change made? getLocalDataSet seems like what we want. ## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/executor/RenameExecutor.java ## @@ -95,18 +84,18 @@ public void executeCommand(Command command, ExecutionHandlerContext context) { default: break; } - } catch (InterruptedException e) { -Thread.currentThread().interrupt(); -command.setResponse( -Coder.getErrorResponse(context.getByteBufAllocator(), "Thread interrupted.")); -return; - } -} catch (InterruptedException e) { - Thread.currentThread().interrupt(); - command.setResponse( - Coder.getErrorResponse(context.getByteBufAllocator(), "Thread interrupted.")); - return; -} +// } catch (InterruptedException e) { Review comment: remove this deadcode This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal opened a new pull request #5153: Revert GEODE-8127: the test is flakey
dschneider-pivotal opened a new pull request #5153: URL: https://github.com/apache/geode/pull/5153 This reverts commit e0cbd78149d520f77e896426b691c217d3afcfb4. 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] 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, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal merged pull request #5153: Revert GEODE-8127: the test is flakey
dschneider-pivotal merged pull request #5153: URL: https://github.com/apache/geode/pull/5153 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] lgtm-com[bot] commented on pull request #5146: removed list, sorted set, hyperLog and transaction redis commands and code
lgtm-com[bot] commented on pull request #5146: URL: https://github.com/apache/geode/pull/5146#issuecomment-632948660 This pull request **fixes 1 alert** when merging 96719b5042336a0cb46e878aa4fe63f1b629ad6b into af1ea6d2ff563db786abf773f572a9a09b0858d0 - [view on LGTM.com](https://lgtm.com/projects/g/apache/geode/rev/pr-b636d9f2a57080435f147846ebbfb0681ecd038c) **fixed alerts:** * 1 for Dereferenced variable may be null This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal merged pull request #5146: GEODE-8175: removed list, sorted set, hyperLog and transaction redis commands and code
dschneider-pivotal merged pull request #5146: URL: https://github.com/apache/geode/pull/5146 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #5149: GEODE-8108: Remove System.out.println calls from geode-redis
dschneider-pivotal commented on pull request #5149: URL: https://github.com/apache/geode/pull/5149#issuecomment-632960137 Thanks for this work. Can you resolve the conflicts in GeodeRedisServer? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal opened a new pull request #5154: GEODE-8180: add 1.14 to management wiki
onichols-pivotal opened a new pull request #5154: URL: https://github.com/apache/geode/pull/5154 add new wiki page id for 1.14 to generator script, and update to support -build.n convention as well as -SNAPSHOT This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal opened a new pull request #5155: Revert "GEODE-8175: removed list, sorted set, hyperLog and transaction redis commands and code"
onichols-pivotal opened a new pull request #5155: URL: https://github.com/apache/geode/pull/5155 Reverts apache/geode#5146 which caused compile error This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal opened a new pull request #5156: GEODE-8175: fix compile error
onichols-pivotal opened a new pull request #5156: URL: https://github.com/apache/geode/pull/5156 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal commented on pull request #5155: Revert "GEODE-8175: removed list, sorted set, hyperLog and transaction redis commands and code"
onichols-pivotal commented on pull request #5155: URL: https://github.com/apache/geode/pull/5155#issuecomment-632979104 easier to just fix, see #5156 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal closed pull request #5155: Revert "GEODE-8175: removed list, sorted set, hyperLog and transaction redis commands and code"
onichols-pivotal closed pull request #5155: URL: https://github.com/apache/geode/pull/5155 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [geode] onichols-pivotal merged pull request #5156: GEODE-8175: fix compile error
onichols-pivotal merged pull request #5156: URL: https://github.com/apache/geode/pull/5156 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org