- Reduce unnecessary log.
- Cargo: now submits multiple(up to config.maxInsetParts) local uncommits in one http post request. This change solves "Too many parts" error on clickhouse server side. Note: use multistream to avoid memory leak when hundred of readable stream piping to the upload request.
- Cargo: no longer extends EventEmitter
- Introduce config.maxInsetParts a) to avoid local commits blocked due to a single failure in the commit queue. and b) to avoide
Too many parts
errors happend on clickhouse server-side
- When multiple cargos are running on the same node, there is a large chance that only one cargo will be committed in each exame routine. Remove
Cargo::_isCommiting
lock since no need for that in the current sequential implementqation. - Add handling to pm2 stop event. Refer: https://pm2.keymetrics.io/docs/usage/signals-clean-restart/