mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 11:13:43 +00:00
[healthCheck] bring back support for redis cluster
Assume `cluster-require-full-coverage=yes` is set for the redis cluster, which is the default value. We are writing into a single hash slot, resulting in a partial health check only. The 'cluster-require-full-coverage=yes' blocks writes as soon as any hash slot is not covered by an active primary. We are leveraging the health check build into the redis cluster topology to bring the scope of the single read/write/delete to the full cluster. REF: 1b3566d6c830289dc826da1d13b75d68205d8dec Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
parent
18fa184230
commit
a53eef5e3d
1 changed files with 1 additions and 6 deletions
|
@ -37,12 +37,7 @@ module.exports = RedisSharelatex =
|
|||
return healthCheck
|
||||
|
||||
clusterHealthCheckBuilder: (client) ->
|
||||
healthCheck = (callback) ->
|
||||
jobs = client.nodes("all").map (node) =>
|
||||
(cb) => RedisSharelatex._checkClient(node, cb)
|
||||
async.parallel jobs, callback
|
||||
|
||||
return healthCheck
|
||||
return RedisSharelatex.singleInstanceHealthCheckBuilder(client)
|
||||
|
||||
_checkClient: (client, callback) ->
|
||||
callback = _.once(callback)
|
||||
|
|
Loading…
Add table
Reference in a new issue