Commit graph

85 commits

Author SHA1 Message Date
Jakob Ackermann
bcd5abadce [misc] version bump to 2.0.0 2020-11-10 10:46:42 +00:00
Jakob Ackermann
41aa5ec876 [misc] rename package to @overleaf/redis-wrapper 2020-11-10 10:46:41 +00:00
Jakob Ackermann
d7eb8c7ecf [misc] refresh package.json
- trim down the files for publishing
- drop sentinel from description
- Overleaf is the new author
- add repository reference
2020-11-10 10:46:41 +00:00
Jakob Ackermann
aabe2d18b9 [misc] rewrite: squash history
- promisify
- merge health check for single node and cluster
- replace the first multi with simple SET in health check
- reworked health check with o-error context/stack-traces for failures
- drop console.error on health check timeout, consumer logs the error
- cleanup unwrapping of ioredis multi result
- Promise support for multi.exec

This has been squashed from das7pad s fork.
REF: b3dd8c5cf4cc6482fd450e6bb67013508844f93f
2020-11-10 10:34:06 +00:00
Jakob Ackermann
ccf4bb1e0e [misc] test/scripts: use logger-sharelatex for logging as in production 2020-11-10 10:15:03 +00:00
Jakob Ackermann
d827b521c6 [misc] test/unit: loosely match the passed redis options
The rewrite will pass a cloned object through.
2020-11-10 10:10:22 +00:00
Jakob Ackermann
4aebc1b0b6 [misc] rewrite: free functions 2020-11-10 10:10:22 +00:00
Jakob Ackermann
da8bef821b [misc] decaffeinate: decaffeinate module 2020-11-10 10:10:21 +00:00
Jakob Ackermann
c973c5b188 [misc] decaffeinate: rename 2/2 2020-11-10 10:10:21 +00:00
Jakob Ackermann
45bf2abb14 [misc] decaffeinate: rename 1/2 2020-11-10 10:10:20 +00:00
Jakob Ackermann
830d6275b3 [misc] add scripts for testing redis cluster 2020-11-10 10:10:06 +00:00
Jakob Ackermann
7b69cc42c9 [misc] decaffeinate tests: decaffeinate unit tests 2020-11-09 17:52:29 +00:00
Jakob Ackermann
7210b3dfed [misc] decaffeinate tests: decaffeinate standalone script 2020-11-09 17:52:20 +00:00
Jakob Ackermann
0a2171e9f0 [misc] decaffeinate tests: rename 2020-11-09 16:57:08 +00:00
Jakob Ackermann
1a090b7b46 [misc] add editor config, eslint, prettier boiler plate
versions taken from o-error (prettier-eslint-cli from real-time)
2020-11-09 16:56:56 +00:00
Jakob Ackermann
7eccce2ed0 [misc] reference module via js/loose file extension 2020-11-09 16:16:11 +00:00
Jakob Ackermann
69df7f5bb3 [misc] move test scripts into test/ tree 2020-11-09 16:11:11 +00:00
Jakob Ackermann
39809562fd [misc] use plain mocha for testing and bump devDependencies 2020-11-09 16:03:33 +00:00
Jakob Ackermann
dddb431034 [misc] drop unused async
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-11-09 16:02:30 +00:00
Jakob Ackermann
a53eef5e3d [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>
2020-11-09 16:02:29 +00:00
Jakob Ackermann
18fa184230 [misc] drop references for 'redis' package from unit tests 2020-11-09 16:02:25 +00:00
Jakob Ackermann
90ad28c51c [misc] drop support for redis-sentinel 2020-11-09 15:59:28 +00:00
Brian Gough
aa16e48321 Merge pull request #15 from overleaf/bg-ioredis-4.17.3
upgrade ioredis to 4.17.3
2020-06-02 08:43:45 +01:00
Brian Gough
cd6e36d7dc upgrade ioredis to 4.17.3 2020-06-01 09:11:57 +01:00
Henry Oswald
3044558351 Merge pull request #14 from overleaf/ho-redis-4-16-1
bump io redis to 4.16.1
2020-03-31 09:47:19 +01:00
Henry Oswald
264e549fc5 bump io redis to 4.16.1 2020-03-31 09:40:44 +01:00
Brian Gough
6bcf4033ae Merge pull request #13 from overleaf/bg-upgrade-ioredis
upgrade ioredis to v4.14.1
2019-10-02 13:10:00 +01:00
Brian Gough
c8d50d0ee9 upgrade ioredis to v4.14.1 2019-10-01 16:44:04 +01:00
John Lees-Miller
626511fa73 Bump version number 2019-09-19 16:11:59 +01:00
Brian Gough
69ba8e391d Merge pull request #11 from overleaf/bg-make-health-check-more-robust
make health check more robust
2019-09-19 15:45:54 +01:00
Brian Gough
d9214b6eeb check full reply in health check 2019-09-19 15:41:43 +01:00
Brian Gough
2435099766 make health check more robust 2019-09-19 15:05:32 +01:00
Henry Oswald
630a957d7b bump ioredis to have naptmap for sentinal 2019-07-02 11:56:21 +01:00
Henry Oswald
d694674b78 put host in error message 2019-05-30 14:36:54 +01:00
Henry Oswald
fd6d52eef7 Merge pull request #10 from overleaf/ho-improve-health-check-error
add redis options inc host ip to error message
2019-05-30 10:15:36 +01:00
Henry Oswald
6600c2e050 add redis options inc host ip to error message 2019-05-30 10:13:05 +01:00
Henry Oswald
b2d6fb77db bump to 1.0.7 2019-05-30 10:12:40 +01:00
Brian Gough
1a4d2b092d Merge pull request #9 from overleaf/bg-fix-tests
fix tests for ioredis as default
2019-05-21 13:54:02 +01:00
Brian Gough
a4bc5ba5b6 fix tests for ioredis as default 2019-05-20 16:15:54 +01:00
Henry Oswald
c6bf123ccd Merge pull request #8 from overleaf/ho-ioredis-default
make ioredis default
2019-05-07 15:57:53 +01:00
Henry Oswald
d1dc6b8ce7 bump ioredis 2019-05-03 11:37:32 +01:00
Henry Oswald
db590651ee make ioredis the driver for standard connections 2019-05-03 11:33:24 +01:00
Brian Gough
16cc171abc Merge pull request #7 from sharelatex/bg-allow-updates-to-ioredis
allow patch updates to ioredis 4.6.0
2019-04-11 15:40:14 +01:00
Brian Gough
f4b2f7742e allow patch updates to ioredis 4.6.0 2019-04-11 15:24:27 +01:00
Henry Oswald
c8070cd191 Merge pull request #5 from sharelatex/ho-redis-io-4
Bump to redisio 4
2019-01-25 15:54:43 +00:00
Henry Oswald
dd3b8eae45 bump ioredis to 4.6.0 which lets us use natMap, package goes to 1.0.5 2019-01-22 15:45:41 +00:00
Brian Gough
cb76ae2f7f Merge pull request #4 from sharelatex/bg-upgrade-ioredis
upgrade ioredis
2017-10-24 11:35:52 +01:00
Brian Gough
1737ddbf29 update ioredis to 3.2.1 2017-10-24 11:30:03 +01:00
Brian Gough
66c09a770e separate out devDependencies 2017-10-24 10:46:38 +01:00
Brian Gough
cf87ef7dd1 Merge pull request #3 from sharelatex/bg-support-opts-for-cluster
add support for passing options to cluster
2017-06-26 13:43:36 +01:00