Skip to content
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

Commands return partial or incomplete data with response aggregation #2946

Open
Muhammad-awawdi-amazon opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Muhammad-awawdi-amazon
Copy link
Collaborator

Describe the bug

Commands that aggregate responses from multiple nodes (e.g., INFO routed to allNodes) may return partial or incomplete data.
This behavior is observed with the ResponsePolicy::Special policy and is not exclusive to the allNodes route.

Expected Behavior

Commands with response aggregation should handle errors gracefully.
If responses from some nodes are missing:

  • Return an error indicating incomplete results.

  • Alternatively, provide a result map with successful results and errors.

Current Behavior

When routed to allNodes, INFO may return incomplete data due to network or node conditions.

Reproduction Steps

const client = await GlideClusterClient.createClient({
    addresses: cluster.getAddresses(),
    protocolVersion: ProtocolVersion.RESP3,
    route: "allNodes",
});

try {
    const result = await client.info();
    console.log(result); // May show partial data or an empty map
} finally {
    client.close();
}

Possible Solution

Implement a result map that:
Includes results from successful nodes.
Captures errors or failures for nodes that do not respond.

Additional Information/Context

No response

Client version used

1.2.1

Engine type and version

Valkey 8.0.1

OS

Ubuntu

Language

TypeScript

Language Version

5.2.2

Cluster information

Cluster Information:

Cluster with 3 primaries and 4 replicas.
Commands routed to all nodes or specific nodes for response aggregation.

Logs

No response

Other information

No response

@Muhammad-awawdi-amazon Muhammad-awawdi-amazon added the bug Something isn't working label Jan 13, 2025
@Muhammad-awawdi-amazon
Copy link
Collaborator Author

Muhammad-awawdi-amazon commented Jan 13, 2025

Related to issue #2837 with the flaky test, was solved with adding request timeout of 3 seconds when creating the client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant