Skip to content

bugfix - the function healthy? should not overwrite default policy's totalTimeout - #74

Draft
lily-a-dev wants to merge 17 commits into
masterfrom
bugfix-healthcheck-shouldnt-mutate-default-policy
Draft

lily-a-dev wants to merge 17 commits into
masterfrom
bugfix-healthcheck-shouldnt-mutate-default-policy

Conversation

@lily-a-dev

Copy link
Copy Markdown

Fixed

  • BREAKING: AerospikeAdminOps/healthy? now relies on the client's
    initialized health policy (default total timeout: 1000ms) instead of accepting
    a timeout override per call. This removes mutation of the shared
    readPolicyDefault on the underlying AerospikeClient, which previously
    could permanently overwrite the configured totalTimeout.

  • Fixed a health check regression: the write TTL now uses max 1 when deriving
    TTL from :totalTimeout, so very small timeouts no longer produce a 0
    TTL (which could skip retention and make checks flaky).

Changed

  • AerospikeAdminOps/healthy? protocol now exposes only the zero-arity
    healthy? [this] contract. Timeout customization is configured at client
    initialization via :health-policy instead of through the protocol call.

  • init-simple-aerospike-client now accepts :health-policy in its conf
    map as string-keyed read-policy overrides. The configured value is applied on
    top of the resolved client policy's readPolicyDefault, with a default
    {\"totalTimeout\" 1000} fallback. This makes health check behavior
    configurable per client without mutating any shared default policy object.

Your GitHub Name and others added 9 commits March 11, 2026 16:48
  `com.aerospike.client.policy.Policy` instead of an `operation-timeout-ms`
  integer. The 1-arity default behavior is unchanged (totalTimeout of 1000ms),
  but callers using the 2-arity must now pass a pre-built `Policy` object.
…n-timeout-ms` integer for health checks, replacing the previous `Policy` parameter. Updated health check logic to prevent zero TTL for small timeouts. Enhanced client configuration to allow `:health-policy` for customizable read policies without shared state mutation.
@github-actions

github-actions Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

Unit Test Results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit fae849d.

♻️ This comment has been updated with latest results.

lily-a-dev added 2 commits March 26, 2026 15:42
@lily-a-dev
lily-a-dev marked this pull request as draft March 26, 2026 15:02
lily-a-dev added 6 commits March 26, 2026 18:37
…f `:health-config`. If health-policy is abset, use the client policy. Updated documentation and tutorial to reflect changes in health policy initialization. Removed deprecated health policy creation function and adjusted related tests for consistency.

This branch has not been deployed

No deployments
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.

1 participant