Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Extends README with documentation for customizing JedisPool configuration via DriverImpl(Pool<Jedis>) constructor.

Changes

Added pool configuration guidelines section:

  • maxTotal, maxIdle, minIdle, maxWait parameter explanations
  • Best practice: maxIdle = maxTotal / 4 for resource/responsiveness balance

Four configuration examples:

  • Basic pool - Standard setup with connection testing (128/32/8)
  • Authentication - JedisClientConfig with credentials and HostAndPort (64/16/4)
  • Timeouts - Connection and socket timeout configuration (128/32/8)
  • SSL/TLS - Secure connections with SSLSocketFactory (64/16/4)

Example Usage

import com.falkordb.Driver;
import com.falkordb.impl.api.DriverImpl;
import redis.clients.jedis.*;

// Configure pool
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(128);
poolConfig.setMaxIdle(32);  // maxTotal / 4
poolConfig.setMinIdle(8);
poolConfig.setMaxWait(Duration.ofSeconds(30));

// Configure client with timeouts and auth
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
    .connectionTimeoutMillis(2000)
    .socketTimeoutMillis(5000)
    .user("default")
    .password("password")
    .build();

// Create driver with custom pool
HostAndPort hostAndPort = new HostAndPort("localhost", 6379);
JedisPool jedisPool = new JedisPool(poolConfig, hostAndPort, clientConfig);
Driver driver = new DriverImpl(jedisPool);

All examples verified against Jedis 6.2.0.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add README to show how to configure the connection pool</issue_title>
<issue_description>Extend the README to also show how to customize the connection and connections pool.

Ref:

public DriverImpl(Pool<Jedis> pool) {

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Nov 6, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 5 commits November 6, 2025 10:19
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
…AndPort

Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Copilot AI changed the title [WIP] Add README to show how to configure connection pool Add connection pool configuration documentation to README Nov 6, 2025
Copilot AI requested a review from gkorland November 6, 2025 10:39
@gkorland gkorland marked this pull request as ready for review December 12, 2025 15:21
@gkorland gkorland requested a review from barakb December 12, 2025 15:22
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.13%. Comparing base (e0973a6) to head (3719fcc).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #197   +/-   ##
=========================================
  Coverage     73.13%   73.13%           
  Complexity      265      265           
=========================================
  Files            25       25           
  Lines           871      871           
  Branches        106      106           
=========================================
  Hits            637      637           
  Misses          172      172           
  Partials         62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add README to show how to configure the connection pool

2 participants