Automatic reconnection on memcached#11
Automatic reconnection on memcached#11andreclimaco wants to merge 2 commits intodataflake:masterfrom
Conversation
|
I modernized the project structure by adding a Makefile for task automation, updating the test workflow (.github/workflows/tests.yml), and updating the documentation. |
|
@andreclimaco I really appreciate the contribution, but I have a problem when you mix the functional changes and tests with package configuration and style changes. What you did here was basically throw out all the tooling and configuration files that I use to maintain this package and impose your own choices and styles. With all due respect for this work, I find that inacceptable. I am (and will continue to be) the maintainer of this package so I am asking everyone else to respect the choices I have made for package management, coding style and the toolchain I use. I am happy to review and incorporate the FUNCTIONAL changes once you have removed all changes to package management-related files and removed all changes that are about style. |
Added module
reconnecting.pywith clientReconnectingClient:Automatic reconnection on memcached network/server failures.
Optional monkey-patch replacing
memcache.Client.Configuration via environment variables:
MCDUTILS_DISABLE_RECONNECT(disables).MCDUTILS_BACKOFF_MIN_MSandMCDUTILS_BACKOFF_MAX_MS(backoff intervals).MCDUTILS_LOG/MCDUTILS_LOG_LEVEL(structured logs).MCDUTILS_METRICS(enables internal metrics).Prometheus metrics export via function
export_prometheus_textfile.Implemented automatic retry in
tpc_voteofMemCacheMapping:New function
_tpc_vote_with_retryencapsulatesMemCacheErrorfailures.Configuration via environment variables:
MCDUTILS_DISABLE_TPC_RETRY(disables retry).MCDUTILS_TPC_RETRY_ATTEMPTS(number of extra attempts).MCDUTILS_TPC_RETRY_BACKOFF_MS(time between attempts).Additional metrics registration:
tpc_retry_attempts_total,tpc_retry_success_total,tpc_retry_fail_totaland accumulated backoff times.