-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async timeout support #397
Conversation
Add timeout support to MultiplexecConnection Add timeout support to ConnectionManager Add async timeout example
You can just wrap your queries with this timeout instead of putting it in redis itself. I don't see any reason to put this into redis. |
That means anyone who ever works on our code has to know they need to wrap every call they might add with a timeout (and really any users of the lib should be doing so because it will never return on its own without it if the server doesn't respond to a command). It's a lot safer to have it done consistently at a lower level, imo. I don't think it's uncommon for redis libraries to handle timeouts. Hiredis has redisAsyncSetTimeout() for example. |
For synchronous io you are more or less forced to use timeouts at the lower level and in other languages there has often been a lack of support for cancellation which also forces the timeouts lower. However in Rust, cancellation can just be a future being dropped so there is no actual need to for the timeout (cancellation) to be at this lower level. Instead the timeout can be fully opt-in, can be put closer to the place that actually cares about being blocked (allowing for multiple operations to be within the same timeout, for instance) and allows for different redis queries to have different timeouts (some queries are fast, others are slow). |
Sure and that all totally makes sense and I would never advocate for forcing everyone into using a timeout for those same reasons (the change I've done here leaves it as opt-in), but to have no option other than wrapping potentially large numbers of existing calls and an unknowable number of calls that could be added in the future, potentially across multiple applications, isn't entirely ideal I think. In any case, the change is there if it seems useful at some point to others. As you mentioned the higher level solution is there. |
* Java: Add `SSCAN` command (redis-rs#394) * Add ScanOptions base class for scan-family options. * Expose the cursor as a String to support unsigned 64-bit cursor values. Co-authored-by: James Duong <james.duong@improving.com> * Java: Add `ZSCAN` command (redis-rs#397) --------- Co-authored-by: James Duong <james.duong@improving.com> * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Correct use of SScanOptions instead of ScanOptions for SScan * Remove plumbing for SCAN command * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * WIP with todos # Conflicts: # glide-core/src/protobuf/redis_request.proto # glide-core/src/request_type.rs # java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java * Add ZScan to TransactionTestUtilities * Spotless cleanup * Test fixes * Cleanup test code * Apply IntelliJ suggestions * Use String.valueOf() instead of concatenating empty string * Added better error info for set comparison failures * More logging for test failures * Add sleeps after zadd() calls To help make sure data is consistent without WAIT * Longer sleeps * Reduce wait time * Experiment with unsigned 64-bit cursors * Fix rebase error * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Apply PR comments * Fix method ordering in BaseTransaction * Fix broken line breaks within code tags in ScanOptions * More thoroughly test results in SharedCommandTests * Add better logging for set comparisons * Spotless * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * Update java/integTest/src/test/java/glide/SharedCommandTests.java Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> * Update java/integTest/src/test/java/glide/SharedCommandTests.java Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> * Fix rebase conflicts * Fix another rebase conflict * Spotless * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Correctly use constants in TransactionTests * Rename ScanOptions to BaseScanOptions * Doc PR fixes * Treat end of cursor as failure * Spotless * Fixes * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Minor doc changes --------- Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
* Java: Add `SSCAN` command (redis-rs#394) * Add ScanOptions base class for scan-family options. * Expose the cursor as a String to support unsigned 64-bit cursor values. Co-authored-by: James Duong <james.duong@improving.com> * Java: Add `ZSCAN` command (redis-rs#397) --------- Co-authored-by: James Duong <james.duong@improving.com> * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Correct use of SScanOptions instead of ScanOptions for SScan * Remove plumbing for SCAN command * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * WIP with todos # Conflicts: # glide-core/src/protobuf/redis_request.proto # glide-core/src/request_type.rs # java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java * Add ZScan to TransactionTestUtilities * Spotless cleanup * Test fixes * Cleanup test code * Apply IntelliJ suggestions * Use String.valueOf() instead of concatenating empty string * Added better error info for set comparison failures * More logging for test failures * Add sleeps after zadd() calls To help make sure data is consistent without WAIT * Longer sleeps * Reduce wait time * Experiment with unsigned 64-bit cursors * Fix rebase error * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * Fix rebase conflicts * Fix another rebase conflict * Spotless * HScan * Flakey test * Add HScan transaction unit test * Rename ScanOptions to BaseScanOptions * Fix merge issues * Fix module-info ordering * Tidy up docs * PR comments Fix up merge duplication and use HScanOptions constants. --------- Co-authored-by: Guian Gumpac <guian.gumpac@improving.com>
* Java: Add XCLAIM command (redis-rs#392) * Python: add XPENDING command (#1704) * Python: add XPENDING command * PR suggestions * PR suggestions * Java: Add Command GeoSearch & GeoSearchStore * Java: Add Command GeoSearch & GeoSearchStore --------- * trigger build * Python: add RANDOMKEY command (#1701) * Python: add RANDOMKEY command * Enable randomkey() test for that redis-rs is fixed Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * NOP push Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> --------- Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Python: add FUNCTION FLUSH command (#1700) * Python: Added FUNCTION LOAD command * Python: adds FUNCTION FLUSH command * Updated CHANGELOG.md * Resolved merge issues related to FlushMode * Minor adjustments on command documentation * Revert one minor change in example. --------- Co-authored-by: Shoham Elias <shohame@amazon.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * removing redis references * Java: Handle panics and errors in the Java FFI layer (#1601) * Restructure Java FFI layer to handle errors properly * Fix failing tests * Address clippy lints * Add tests for error and panic handling * Add missing errors module * Fix clippy lint * Fix FFI tests * Apply Spotless * Fix some minor issue I forgot about * Add some comments * Apply Spotless * Make handle_panics return Option<T> instead * Java: Add SSCAN and ZSCAN commands (#1705) * Java: Add `SSCAN` command (redis-rs#394) * Add ScanOptions base class for scan-family options. * Expose the cursor as a String to support unsigned 64-bit cursor values. Co-authored-by: James Duong <james.duong@improving.com> * Java: Add `ZSCAN` command (redis-rs#397) --------- Co-authored-by: James Duong <james.duong@improving.com> * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Correct use of SScanOptions instead of ScanOptions for SScan * Remove plumbing for SCAN command * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * WIP with todos * Add ZScan to TransactionTestUtilities * Spotless cleanup * Test fixes * Cleanup test code * Apply IntelliJ suggestions * Use String.valueOf() instead of concatenating empty string * Added better error info for set comparison failures * More logging for test failures * Add sleeps after zadd() calls To help make sure data is consistent without WAIT * Longer sleeps * Reduce wait time * Experiment with unsigned 64-bit cursors * Fix rebase error * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Apply PR comments * Fix method ordering in BaseTransaction * Fix broken line breaks within code tags in ScanOptions * More thoroughly test results in SharedCommandTests * Add better logging for set comparisons * Spotless * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * Update java/integTest/src/test/java/glide/SharedCommandTests.java Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> * Update java/integTest/src/test/java/glide/SharedCommandTests.java Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> * Fix rebase conflicts * Fix another rebase conflict * Spotless * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/models/BaseTransaction.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Correctly use constants in TransactionTests * Rename ScanOptions to BaseScanOptions * Doc PR fixes * Treat end of cursor as failure * Spotless * Fixes * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Minor doc changes --------- Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * CI: Add Support for Valkey 6.2, 7.0 and 7.2 (#1711) - Transitioned the engine building process to be sourced from the Valkey repository. - Introduced compatibility with the following engine versions: Valkey and Redis 6.2 Valkey and Redis 7.0 Valkey and Redis 7.2 (first stable release of Valkey 7.2.5.) - Engine Installation Checks: Added check that the engine is installed with the requested version. - Moved the engine version matrix to a JSON file for better management and readability. - Fixed Object Encoding tests to expect quicklist on versions < 7.2 instead of 7.0 - Fixed C# and Java version parsing from redis-server -v output to support also Valkey's output - Updated the README file with the supported versions & engine typ * Python: add FUNCTION DELETE command (#1714) * Python: adds FUNCTION DELETE command Co-authored-by: Shoham Elias <shohame@amazon.com> * Python: add `SSCAN` command (#1709) * Added sscan command to python * Fixed formatting * Fixed CI failures * Lint * Improved example and test * Changes based on sscan java PR * Added to changelog * Addressed PR comments * Added string casting * Java: Add HSCAN command (#1706) * Java: Add `SSCAN` command (redis-rs#394) * Add ScanOptions base class for scan-family options. * Expose the cursor as a String to support unsigned 64-bit cursor values. Co-authored-by: James Duong <james.duong@improving.com> * Java: Add `ZSCAN` command (redis-rs#397) --------- Co-authored-by: James Duong <james.duong@improving.com> * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Correct use of SScanOptions instead of ScanOptions for SScan * Remove plumbing for SCAN command * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * WIP with todos * Add ZScan to TransactionTestUtilities * Spotless cleanup * Test fixes * Cleanup test code * Apply IntelliJ suggestions * Use String.valueOf() instead of concatenating empty string * Added better error info for set comparison failures * More logging for test failures * Add sleeps after zadd() calls To help make sure data is consistent without WAIT * Longer sleeps * Reduce wait time * Experiment with unsigned 64-bit cursors * Fix rebase error * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * Fix rebase conflicts * Fix another rebase conflict * Spotless * HScan * Flakey test * Add HScan transaction unit test * Rename ScanOptions to BaseScanOptions * Fix merge issues * Fix module-info ordering * Tidy up docs * PR comments Fix up merge duplication and use HScanOptions constants. --------- Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> * Python: add LCS command (#1716) * python: add LCS command (redis-rs#406) * python: add LCS command * update CHANGELOG * add more comment explaning the functionality of the command * address comments on the docs * Java: Changed handling of large requests to transfer them as leaked pointers (#1708) * Restructure Java FFI layer to handle errors properly * Address clippy lints * Add tests for error and panic handling * Fix FFI tests * Apply Spotless * Fix some minor issue I forgot about * Add API to create the leaked bytes vec * Bridge the MAX_REQUEST_ARGS_LENGTH constant from Rust to Java * Fix warnings in Rust * Update Java client to utilize the pointer with large argument sizes * Update createLeakedBytesVec to handle panics * spotless * Add docs and run Rust linters * Add large value tests * Fix transactions and add transaction tests * dummy commit for CI * Revert "dummy commit for CI" This reverts commit 3ed193770fe21407e2d12e0d3341f27be1d455e1. * Fix JDK11 build issue Due to using a JDK17 function * Fix another JDK11 issue * Fix merge issues. * Remove unneccesary mut prefix * Clarify the MAX_REQUEST_ARGS_LENGTH_IN_BYTES constant * Fix merge issue --------- Co-authored-by: Jonathan Louie <jonathanl@bitquilltech.com> * Create initial workflow for publishing to Maven Central (#1600) * WIP Create initial workflow for publishing to Maven Central (#1594) * WIP Create initial workflow for publishing to Maven Central * Add classifier to workflow * Remove condition to allow all jobs to run * Try to fix Gradle workflow errors * Re-enable aws related options * Add missing property * Revert "Add missing property" This reverts commit 6cc5fba787385063bb6faac0885abeb78a7a49b6. * Add AWS_ACTIONS option * Sign JAR file * Fix signing issue * Try to fix issue with generating secring.gpg file * Fix path to secring.gpg * Try to fix secring.gpg retrieval issue * Remove base64 decode * Try to fix multi-line issue with GPG key secret * Go back to echo approach * Decode base64 properly this time * Use GPG_KEY_ID * Surround password in quotes * Publish JAR to local Maven and upload * Update examples build.gradle * Sign publishToMavenLocal build * Update version of Java JAR * Properly fetch src_folder variable contents * Reorganize JAR contents * Update path of uploaded JAR * Update artifact ID * Add missing comma * Replace placeholders in build.gradle * Update examples build.gradle * Remove test runs from java.yml workflow * Add debugging info to workflow * Adjust debug info * Readd placeholder text in build.gradle * Add more debug info * Change how the JAR is copied * Add configurations for ARM linux and x86 macos * Prevent output artifacts from being swallowed * Update build matrix to use proper RUNNERs * Try to use self-hosted runner for ARM Linux builds * Delete gradle-cd workflow * Add id-token permissions * Add step to setup self-hosted runner access * Add CONTAINER property to java.yml workflow * Remove install Redis step from java.yml workflow * Remove test-benchmark step from java.yml workflow * Fix issue with Java classifier * Update java.yml to use classifier * Bump version and add archiveClassifier * Change groupId to valkey-client * Update example and base archive name * Update workflow * Rename to glide-for-redis * Extracting Java Deployment to a different workflow Workflow will only trigger when a tag is pushed to the repo Version is extracted from the tag and replaced in the build.grade files reverted changes of java.yml file * trying to make the workflow to build * testing action to prepare build * forcing new action to trigger * Revert "forcing new action to trigger" This reverts commit d097a1f50608d0e053d847135436325256a3bdfb. * Revert "testing action to prepare build" This reverts commit 8864434d2bbecc8b6e8eb9ab800b90ed1cf22462. * Revert "trying to make the workflow to build" This reverts commit 143818abb87269bde21d1372205d61d2e9fae173. * Revert "Extracting Java Deployment to a different workflow" This reverts commit faff84694a309b0ccf80fa40d58d9c5f9d56bdb2. * Revert "Revert "Extracting Java Deployment to a different workflow"" This reverts commit 11f8470ff1ce859ab85b6858522dc9fef8b928cb. * fixing workflow * fixed path for the local maven * removing bundle from the tests fix to the JAVA CI not finding tests dependencies * fix java workflow * removing classifier from the pom * fixing concurrency * Remove publishToMavenLocal line in examples build.gradle * fix examples * cleaning up java.yml * testing removing test dependency * adding skip signing * Revert "adding skip signing" This reverts commit e4487882d523ac33828125767afda54472515c14. * Revert "testing removing test dependency" This reverts commit d0e06b70119b0b11d8c8683743dac64c8dd2eef2. * Revert "cleaning up java.yml" This reverts commit e7394d77220f4c6bff4f46fd32bc161ac4b78a0a. * removing dependency of singing in the local build * java.yml clean up * removing steps from java.yml * added comments * removed step on sed the examples and removed if always from the upload artifacts --------- Co-authored-by: affonsov <affonsov@bitquilltech.com> Co-authored-by: affonsov <affonso.vieira@improving.com> * #1715: fix flakey test in xpending (#1717) Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Java: Adding command WAIT (#1707) * Java: Adding command WAIT Java: Adding command WAIT * addressing comments * fixing timeout_idx in get_timeout_from_cmd_args call * update timeout check * fixing rust test * adding special case for WAIT * rust linter * remove special case in get_timeout_from_cmd_args * adding description for timeout 0 * rust linter * updating timeout test * changing transaction documentation --------- Co-authored-by: TJ Zhang <tj.zhang@improving.com> * support smismember with GlideString (#1694) * Support GlideString for sdiff commands (#1722) Co-authored-by: Yulazari <yulazari@b0de28c93acb.ant.amazon.com> * Updated attribution files * support hset, hget, lindex, linsert, blmove, incr, hlen and lmove wit… (#1667) * Python: move the commands return value to bytes (#1617) * In the case of Simple String, Bulk String, or Verbatim String commands, Bytes will be returned instead of strings. --------- Co-authored-by: GilboaAWS <gilboabg@amazon.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-41-43.eu-west-1.compute.internal> Co-authored-by: Adar Ovadia <adarov@amazon.com> Co-authored-by: Shoham Elias <shohame@amazon.com> Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com> * Java: Add XGROUP SETID command (#1720) * Initial implementation of XGroupSetId * Unit tests * Add integration tests * PR feedback * Address PR comments doc updates * Add 7.0.0 transaction integration test * Java: update README directory to include Java's README.md (#1734) add java part to readme directory * Java: Add XCLAIM command Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add unit tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add transaction tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * SPOTLESS Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update IT tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update IT tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add UT tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add transaction tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Fix transaction tests Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update XCLAIM with options; remove LASTID Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add a couple more test cases Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * clean up Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Clean rust Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Add examples Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Move to 2D string array in response Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Fix Transaction tests; update examples Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * SPOTLESS Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> --------- Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> Co-authored-by: tjzhang-BQ <111323543+tjzhang-BQ@users.noreply.github.com> Co-authored-by: TJ Zhang <tj.zhang@improving.com> Co-authored-by: Yi-Pin Chen <yi-pin.chen@improving.com> Co-authored-by: Shoham Elias <shohame@amazon.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> Co-authored-by: James Duong <duong.james@gmail.com> Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com> Co-authored-by: James Duong <james.duong@improving.com> Co-authored-by: James Xin <126831592+jamesx-improving@users.noreply.github.com> Co-authored-by: Jonathan Louie <jonathanl@bitquilltech.com> Co-authored-by: affonsov <affonsov@bitquilltech.com> Co-authored-by: affonsov <affonso.vieira@improving.com> Co-authored-by: Alon Arenberg <93711356+alon-arenberg@users.noreply.github.com> Co-authored-by: yulazariy <yulazari@amazon.com> Co-authored-by: Yulazari <yulazari@b0de28c93acb.ant.amazon.com> Co-authored-by: ort-bot <glide-for-redis@amazon.com> Co-authored-by: adarovadya <adarovadya@gmail.com> Co-authored-by: GilboaAWS <gilboabg@amazon.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-41-43.eu-west-1.compute.internal> Co-authored-by: Adar Ovadia <adarov@amazon.com> Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com> Co-authored-by: Chloe Yip <168601573+cyip10@users.noreply.github.com> * SPOTLESS Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Fix merge conflicts Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Review comments Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Update docs for review comments Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * small doc fix Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> --------- Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com> Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> Co-authored-by: tjzhang-BQ <111323543+tjzhang-BQ@users.noreply.github.com> Co-authored-by: TJ Zhang <tj.zhang@improving.com> Co-authored-by: Yi-Pin Chen <yi-pin.chen@improving.com> Co-authored-by: Shoham Elias <shohame@amazon.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> Co-authored-by: James Duong <duong.james@gmail.com> Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com> Co-authored-by: James Duong <james.duong@improving.com> Co-authored-by: James Xin <126831592+jamesx-improving@users.noreply.github.com> Co-authored-by: Jonathan Louie <jonathanl@bitquilltech.com> Co-authored-by: affonsov <affonsov@bitquilltech.com> Co-authored-by: affonsov <affonso.vieira@improving.com> Co-authored-by: Alon Arenberg <93711356+alon-arenberg@users.noreply.github.com> Co-authored-by: yulazariy <yulazari@amazon.com> Co-authored-by: Yulazari <yulazari@b0de28c93acb.ant.amazon.com> Co-authored-by: ort-bot <glide-for-redis@amazon.com> Co-authored-by: adarovadya <adarovadya@gmail.com> Co-authored-by: GilboaAWS <gilboabg@amazon.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-41-43.eu-west-1.compute.internal> Co-authored-by: Adar Ovadia <adarov@amazon.com> Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com> Co-authored-by: Chloe Yip <168601573+cyip10@users.noreply.github.com>
This adds some basic timeout support to MultiplexedConnection and ConnectionManager (#395) by wrapping the req_packed_command() and req_packed_commands() contents in a tokio timeout when a timeout is set. I've also added a simple example that can be used to induce a timeout with some special treatment of the redis server - SIGTSTP / Ctrl+Z it so that it accepts connections but never responds to commands. This should help with scenarios where an async redis connection stops responding but isn't broken.