[geode] branch develop updated (10f5f30 -> b377e3f)
This is an automated email from the ASF dual-hosted git repository. nnag pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 10f5f30 GEODE-9436: Implement Radish ZREMRANGEBYSCORE command (#6800) add b377e3f GEODE-9408: Avoid duplicate events sent by Serial Gateway Sender when group-transaction-events is true (#6663) No new revisions were added by this update. Summary of changes: .../org/apache/geode/cache/wan/GatewaySender.java | 24 ++ .../geode/cache/wan/GatewaySenderFactory.java | 9 + .../internal/cache/wan/AbstractGatewaySender.java | 413 +++-- .../cache/wan/GatewaySenderAttributes.java | 11 + .../wan/parallel/ParallelGatewaySenderQueue.java | 14 +- .../cache/wan/serial/SerialGatewaySenderQueue.java | 75 ++-- .../geode/internal/lang/SystemPropertyHelper.java | 7 + .../geode/internal/cache/wan/WANTestBase.java | 4 + .../wan/parallel/ParallelWANStatsDUnitTest.java| 136 ++- .../cache/wan/serial/SerialWANStatsDUnitTest.java | 132 ++- .../wan/internal/GatewaySenderFactoryImpl.java | 6 + 11 files changed, 583 insertions(+), 248 deletions(-)
[geode] branch develop updated (b944ace -> 10f5f30)
This is an automated email from the ASF dual-hosted git repository. donalevans pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from b944ace GEODE-9451: On demand authentication expiration and re-authentication (#6787) add 10f5f30 GEODE-9436: Implement Radish ZREMRANGEBYSCORE command (#6800) No new revisions were added by this update. Summary of changes: ...ZRemRangeByScoreNativeRedisAcceptanceTest.java} | 3 +- .../sortedset/ZRemRangeByScoreDUnitTest.java | 263 .../server/AbstractHitsMissesIntegrationTest.java | 5 + .../AbstractZRemRangeByScoreIntegrationTest.java | 271 + ...t.java => ZRemRangeByScoreIntegrationTest.java} | 2 +- .../geode/redis/internal/RedisCommandType.java | 2 + .../redis/internal/data/NullRedisSortedSet.java| 8 + .../geode/redis/internal/data/RedisSortedSet.java | 48 .../RedisSortedSetCommandsFunctionExecutor.java| 6 + .../executor/sortedset/RedisSortedSetCommands.java | 2 + ...Executor.java => ZRemRangeByScoreExecutor.java} | 7 +- 11 files changed, 610 insertions(+), 7 deletions(-) copy geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/{ZRemNativeRedisAcceptanceTest.java => ZRemRangeByScoreNativeRedisAcceptanceTest.java} (91%) create mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/sortedset/ZRemRangeByScoreDUnitTest.java create mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZRemRangeByScoreIntegrationTest.java copy geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/{ZRemIntegrationTest.java => ZRemRangeByScoreIntegrationTest.java} (91%) copy geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/{ZCountExecutor.java => ZRemRangeByScoreExecutor.java} (89%)
[geode-native] branch develop updated: GEODE-9464: Add Asp.Net Core session state sample application (#856)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 597ab21 GEODE-9464: Add Asp.Net Core session state sample application (#856) 597ab21 is described below commit 597ab211c7182ceab8942816f9adbe49d3af3b8f Author: Michael Martell AuthorDate: Thu Aug 26 13:33:36 2021 -0700 GEODE-9464: Add Asp.Net Core session state sample application (#856) * Add AspNetCore GeodeSession Sample * Create region for sessionState in startserver * Add Apache license header --- .../AspNetCore GeodeSession Sample.csproj | 13 ++ .../AspNetCore GeodeSession Sample.csproj.user | 6 + .../Extensions/SessionExtensions.cs| 53 + .../Middleware/HttpContextItemsMiddleware.cs | 45 .../Models/BasicAuthInitialize.cs | 47 .../Models/ErrorViewModel.cs | 27 +++ .../Pages/Error.cshtml | 42 .../Pages/Error.cshtml.cs | 36 .../Pages/Index.cshtml | 99 + .../Pages/Index.cshtml.cs | 62 ++ .../Pages/Shared/_Layout.cshtml| 237 + .../Pages/_ViewImports.cshtml | 19 ++ .../Pages/_ViewStart.cshtml| 19 ++ netcore/AspNetCore GeodeSession Sample/Program.cs | 29 +++ .../Properties/launchSettings.json | 28 +++ netcore/AspNetCore GeodeSession Sample/README.md | 58 + netcore/AspNetCore GeodeSession Sample/Startup.cs | 79 +++ .../appsettings.Development.json | 9 + .../appsettings.Production.json| 9 + .../appsettings.json | 17 ++ netcore/geode-dotnet-core.sln | 7 + netcore/scripts/startserver.ps1| 8 +- netcore/scripts/startserver.sh | 4 +- 23 files changed, 948 insertions(+), 5 deletions(-) diff --git a/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj new file mode 100644 index 000..fb587cb --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj @@ -0,0 +1,13 @@ + + + +netcoreapp3.1 +x64 + + + + + + + + diff --git a/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user new file mode 100644 index 000..9dd7dfa --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user @@ -0,0 +1,6 @@ + +http://schemas.microsoft.com/developer/msbuild/2003";> + +IIS Express + + diff --git a/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs b/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs new file mode 100644 index 000..367ee56 --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System.Text.Json; +using Microsoft.AspNetCore.Http; + +namespace Web.Extensions { +#region snippet1 + public static class SessionExtensions { +public static void Set(this ISession session, string key, T value) { + session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static T Get(this ISession session, string key) { + var value = session.GetString(key); + return value == null ? default : JsonSerializer.Deserialize(value); +} + } +#endregion +} + +namespace Web.Extensions2 { + // Alternate approach + + public static class SessionExtensions { +public static void Set(this ISession session, string key, T value) { + session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static bool TryGet(this ISession session, string key, out T value) { +
[geode-native] branch develop updated: Fix buffer overflow gripes in RHEL-8 build (#861)
This is an automated email from the ASF dual-hosted git repository. bbender pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 5f7981e Fix buffer overflow gripes in RHEL-8 build (#861) 5f7981e is described below commit 5f7981e1ca7c980e699ade47dfbe927b98f8d025 Author: Blake Bender AuthorDate: Thu Aug 26 13:20:33 2021 -0700 Fix buffer overflow gripes in RHEL-8 build (#861) - RHEL-8 CI images appear to have picked up a new compiler that's flagging some broken sprintf code in a couple of legacy tests. --- cppcache/integration-test/testExpiration.cpp | 25 -- .../testThinClientLRUExpiration.cpp| 10 +++-- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/cppcache/integration-test/testExpiration.cpp b/cppcache/integration-test/testExpiration.cpp index a3678be..08b374c 100644 --- a/cppcache/integration-test/testExpiration.cpp +++ b/cppcache/integration-test/testExpiration.cpp @@ -54,33 +54,26 @@ void startDSandCreateCache(std::shared_ptr &cache) { void doNPuts(std::shared_ptr &rptr, int n) { std::shared_ptr value; - char buf[16]; - memset(buf, 'A', 15); - buf[15] = '\0'; - memcpy(buf, "Value - ", 8); - value = CacheableString::create(buf); + value = CacheableString::create("Value - AAA"); ASSERT(value != nullptr, "Failed to create value."); for (int i = 0; i < n; i++) { -sprintf(buf, "KeyA - %d", i + 1); -auto key = CacheableKey::create(buf); -LOGINFO("Putting key %s value %s in region %s", buf, +auto keyStr = std::string("KeyA - ") + std::to_string(i + 1); +auto key = CacheableKey::create(keyStr); +LOGINFO("Putting key %s value %s in region %s", keyStr.c_str(), value->toString().c_str(), rptr->getFullPath().c_str()); rptr->put(key, value); } } + std::shared_ptr do1Put(std::shared_ptr &rptr) { std::shared_ptr value; - char buf[16]; - memset(buf, 'A', 15); - buf[15] = '\0'; - memcpy(buf, "Value - ", 8); - value = CacheableString::create(buf); + value = CacheableString::create("Value - AAA"); ASSERT(value != nullptr, "Failed to create value."); - sprintf(buf, "KeyA - %d", 0 + 1); - auto key = CacheableKey::create(buf); - LOGINFO("Putting key %s value %s in region %s", buf, + std::string keyStr("KeyA - 1"); + auto key = CacheableKey::create(keyStr); + LOGINFO("Putting key %s value %s in region %s", keyStr.c_str(), value->toString().c_str(), rptr->getFullPath().c_str()); rptr->put(key, value); return key; diff --git a/cppcache/integration-test/testThinClientLRUExpiration.cpp b/cppcache/integration-test/testThinClientLRUExpiration.cpp index 1adb0f0..8ddf7c2 100644 --- a/cppcache/integration-test/testThinClientLRUExpiration.cpp +++ b/cppcache/integration-test/testThinClientLRUExpiration.cpp @@ -172,19 +172,15 @@ void createRegion(const char *name, bool ackMode, void doRgnOperations(const char *name, int n, int rgnOpt = 0) { std::shared_ptr value; - char buf[16]; if (rgnOpt == 0) { -memset(buf, 'A', 15); -buf[15] = '\0'; -memcpy(buf, "Value - ", 8); -value = CacheableString::create(buf); +value = CacheableString::create("Value - AAA"); ASSERT(value != nullptr, "Failed to create value."); } auto rptr = getHelper()->getRegion(name); ASSERT(rptr != nullptr, "Region not found."); for (int i = 0; i < n; i++) { -sprintf(buf, "KeyA - %d", i + 1); -auto key = CacheableKey::create(buf); +auto keyStr = std::string("KeyA - ") + std::to_string(i + 1); +auto key = CacheableKey::create(keyStr); switch (rgnOpt) { case 0: rptr->put(key, value);