scan command gives empty output sometimes when we run it in cluster mode with multiple shards (3 shards). Is there any solution to run scan command in all shards.
I have tried to use this code:
const masters = cluster.nodes("master");
Promise.all(
masters
.map((node) => node.keys())
.then((keys) => {
// keys: [['key1', 'key2'], ['key3', 'key4']]
})
);
scan command gives empty output sometimes when we run it in cluster mode with multiple shards (3 shards). Is there any solution to run scan command in all shards. I have tried to use this code: const masters = cluster.nodes("master"); Promise.all( masters .map((node) => node.keys()) .then((keys) => { // keys: [['key1', 'key2'], ['key3', 'key4']] }) );
but it gives no response