Skip to content

Commit

Permalink
modify timeout to 3 secs and add documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Awawdi <[email protected]>
  • Loading branch information
Muhammad-awawdi-amazon committed Dec 25, 2024
1 parent 6f655b1 commit 4df068a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion node/src/GlideClusterClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import {
convertGlideRecordToRecord,
} from "./BaseClient";
import {
ClusterScanOptions,
FlushMode,
FunctionListOptions,
FunctionListResponse,
FunctionRestorePolicy,
FunctionStatsSingleResponse,
InfoOptions,
LolwutOptions,
ClusterScanOptions,
createClientGetName,
createClientId,
createConfigGet,
Expand Down Expand Up @@ -785,6 +785,7 @@ export class GlideClusterClient extends BaseClient {
*
* The command will be routed to all primary nodes, unless `route` is provided.
*
* When `route` is set to `allNodes`, the `INFO` command may return partial data, as the response from each node might be incomplete due to factors like network conditions or node load. This can lead to varying results across different executions.
* @see {@link https://valkey.io/commands/info/|valkey.io} for details.
*
* @param options - (Optional) Additional parameters:
Expand Down
10 changes: 5 additions & 5 deletions node/tests/GlideClusterClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ describe("GlideClusterClient", () => {
getClientConfigurationOption(
azCluster.getAddresses(),
protocol,
{ requestTimeout: 5000 },
{ requestTimeout: 3000 },
),
);

Expand Down Expand Up @@ -2135,7 +2135,7 @@ describe("GlideClusterClient", () => {
azCluster.getAddresses(),
protocol,
{
requestTimeout: 5000,
requestTimeout: 3000,
readFrom: "AZAffinity" as ReadFrom,
clientAz: az,
},
Expand Down Expand Up @@ -2244,7 +2244,7 @@ describe("GlideClusterClient", () => {
getClientConfigurationOption(
azCluster.getAddresses(),
protocol,
{ requestTimeout: 5000 },
{ requestTimeout: 3000 },
),
);

Expand Down Expand Up @@ -2278,7 +2278,7 @@ describe("GlideClusterClient", () => {
azCluster.getAddresses(),
protocol,
{
requestTimeout: 5000,
requestTimeout: 3000,
readFrom: "AZAffinity",
clientAz: az,
},
Expand Down Expand Up @@ -2367,7 +2367,7 @@ describe("GlideClusterClient", () => {
{
readFrom: "AZAffinity",
clientAz: "non-existing-az",
requestTimeout: 2000,
requestTimeout: 3000,
},
),
);
Expand Down
2 changes: 2 additions & 0 deletions python/python/glide/async_commands/cluster_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ async def info(
information to retrieve. When no parameter is provided, the default option is assumed.
route (Optional[Route]): The command will be routed to all primaries, unless `route` is provided, in which
case the client will route the command to the nodes defined by `route`. Defaults to None.
When `route` is set to `allNodes`, the `INFO` command may return partial data, as the response from each node
might be incomplete due to factors like network conditions or node load. This can lead to varying results across different executions.
Returns:
TClusterResponse[bytes]: If a single node route is requested, returns a bytes string containing the information for
Expand Down

0 comments on commit 4df068a

Please sign in to comment.