mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
committed by
Jakob Ackermann
parent
18fa184230
commit
a53eef5e3d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user