Skip to content

Conversation

andreclimaco
Copy link

  • Added module reconnecting.py with client ReconnectingClient:

    • Automatic reconnection on memcached network/server failures.

    • Optional monkey-patch replacing memcache.Client.

    • Configuration via environment variables:

      • MCDUTILS_DISABLE_RECONNECT (disables).
      • MCDUTILS_BACKOFF_MIN_MS and MCDUTILS_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_vote of MemCacheMapping:

    • New function _tpc_vote_with_retry encapsulates MemCacheError failures.

    • 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_total and accumulated backoff times.

andre.climaco@gmail.com and others added 2 commits October 6, 2025 16:25
@andreclimaco
Copy link
Author

I modernized the project structure by adding a Makefile for task automation, updating the test workflow (.github/workflows/tests.yml), and updating the documentation.

@dataflake
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants