Spot the bug in the linearizable read

from CAP theorem
Node 24 intermediate 4 min 1 issue to find

Find the flaw in this generated function, which promises a linearizable read.

JavaScript
async function readLinearizable(key, replicas) {
  return Promise.any(replicas.map((replica) => replica.read(key)));
}
Open in playground
Report an error