- 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
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>
```
> require('http').globalAgent.sockets
{ 'HOST:PORT:': [{ ... }, { ... }] }
```
- `new URL('http://HOST:PORT:')` throws
-> test suite `open_sockets`
- gauges were not cleaned up after no agents were present for a given
key. This lead to continuous emission of the previous connection
count for a given hostname, following the completion of all requests.
-> test suite `when all requests complete`
Metrics.initialize() and Metrics.configure() will configure the default
Prometheus registry with default "app" and "host" labels. The configured
prom-client module is available as Metrics.prom.
The GCS persistor error handler ignores 404 errors on deletes. However,
the net is too wide cast, and 404 errors coming from the dual-bucket
lifecycle mechanism are also ignored.
Version 3.2.0 crashes on startup because it calls buildPromKey() without
arguments. To avoid this kind of obvious bug to happen again, I added
some basic acceptance tests.
* Add OError.maxTags
* Tidy up package scripts and add a build script
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Document a way of handling an error that might be null
* Make typecheck strict
* Test some edge cases
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
The GCS library automatically decompresses files with Content-encoding:
gzip. This is very useful, but the S3 library doesn't do that, so we
need to disable the feature in GCS so that it behaves the same way other
persistors behave.
Add contentType and contentEncoding options to sendStream(). These
options will set the corresponding metadata on the object.
This changes the API. The fourth argument to sendStream() used to be the
source md5. Now, it's an options object and the source md5 is a property
of that object.
The v1 history service has its routes set up via swagger-tools, which
doesn't write a route property on the request. This prevents us to send
request metrics based on the route, but we can still log the request.
* Create new module from overleaf/filestore persistors
* Convert persistors to ES6 classes with local settings
* Update README.md
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Update README.md
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Update .gitignore
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Switch to AGPL license
* Paginate S3 list-object results
* Remove S3 client caching
* Clean up S3 md5-verification mechanism
* Update README for recent changes
* Update README.md
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Remove package-lock
* Remove comment about FileHandler
* Add directory marker to FSPersistor.deleteDirectory
* Don't copy opts in GcsPersistor.getObjectStream
* Use Date.now instead of getTime
* Catch errors in migration persistor
* Check that settings.buckets exists
* Don't mutate options in ObserverStream constructor
* Update src/PersistorHelper.js
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
* Lint and format fixes
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>