Skip to content

Commit

Permalink
[#25278]: DocDB: Do not start redis proxy by default
Browse files Browse the repository at this point in the history
Summary:
Redis is no longer supported. Starting the proxy causes unnecessary overhead.

Fixes #25278

Test Plan: Jenkins

Reviewers: slingam

Reviewed By: slingam

Subscribers: yql, svc_phabricator, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D40614
  • Loading branch information
hari90 committed Dec 13, 2024
1 parent 5dc707d commit 31b1d87
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.yb.client.YBClient;
import org.yb.Common.PartitionSchemaPB.HashSchema;
import org.yb.minicluster.BaseMiniClusterTest;
import org.yb.minicluster.MiniYBClusterBuilder;
import org.yb.util.BuildTypeUtil;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
Expand All @@ -37,6 +38,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.function.Consumer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -70,6 +72,16 @@ protected enum JedisClientType { JEDIS, JEDISCLUSTER, YBJEDIS };
protected JedisCommands jedis_client_1;
private static final Logger LOG = LoggerFactory.getLogger(BaseJedisTest.class);

protected void createMiniCluster(int numMasters, int numTservers,
Map<String, String> additionalMasterFlags, Map<String, String> additionalTserverFlags,
Consumer<MiniYBClusterBuilder> customize, Map<String, String> additionalEnvironmentVars)
throws Exception {
Map<String, String> tserverFlags = new HashMap<>(additionalTserverFlags);
tserverFlags.put("start_redis_proxy", "true");
super.createMiniCluster(numMasters, numTservers, additionalMasterFlags, tserverFlags, customize,
additionalEnvironmentVars);
}

class TSValuePairs {
TSValuePairs(int size) {
pairs = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void testMovedReply() throws Exception {
// Add a node and verify our commands succeed.
LOG.info("Adding a new node ");
miniCluster.startTServer(ImmutableMap.of(
"start_redis_proxy", "true",
"forward_redis_requests", "false",
"memory_limit_hard_bytes", String.valueOf(MEMORY_LIMIT)));

Expand Down
2 changes: 1 addition & 1 deletion src/yb/tserver/tablet_server_main_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ using yb::pgwrapper::PgSupervisor;
using namespace yb::size_literals; // NOLINT
using namespace std::chrono_literals;

DEFINE_NON_RUNTIME_bool(start_redis_proxy, true,
DEFINE_NON_RUNTIME_bool(start_redis_proxy, false,
"Starts a redis proxy along with the tablet server");

DEFINE_NON_RUNTIME_bool(start_cql_proxy, true, "Starts a CQL proxy along with the tablet server");
Expand Down
1 change: 1 addition & 0 deletions src/yb/yql/redis/redisserver/redisserver-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,7 @@ class TestRedisServiceExternal : public TestRedisService {
void TestPubSub(LocalOrCluster ltype, SubOrUnsub stype, PatternOrChannel ptype);

void CustomizeExternalMiniCluster(ExternalMiniClusterOptions* opts) override {
opts->extra_tserver_flags.push_back("--start_redis_proxy=true");
opts->extra_tserver_flags.push_back(
"--redis_connection_soft_limit_grace_period_sec=" +
AsString(static_cast<int>(kSoftLimitGracePeriod.ToSeconds())));
Expand Down

0 comments on commit 31b1d87

Please sign in to comment.