Skip to content

Aggregate health backend and server stats C API - #191

Merged
bedipritpal merged 1 commit into
FiveTechSoft:mainfrom
bedipritpal:port/health-backend-upstream
Oct 10, 2026
Merged

bedipritpal merged 1 commit into
FiveTechSoft:mainfrom
bedipritpal:port/health-backend-upstream

Conversation

@bedipritpal

Copy link
Copy Markdown
Collaborator

Stage6: aggregate health backend, based on upstream793251aa afterPR190.

  • Add OAdsGetServerStats for an AdsMgConnect management handle and the additive HealthJson read request. Existing management handshake/credential/opcode/resource guards remain; legacy credential-free loopback management stays read-only.
  • Aggregate-only schema1 JSON: logical workarea/table-handle event-retained peaks, existing user/connection/index/lock telemetry, resolved session cap/source, wide cumulative counters and optional Linux processFD measurements. No usernames, addresses, SQL, credentials or path strings.
  • NULL/short buffers report required size including NUL and write no partial JSON. Older servers rejecting the additive request return AE_FUNCTION_NOT_AVAILABLE. Replies have size/object-envelope checks, not full JSON syntax validation.
  • Explicit max_sessions=0 now correctly overrides the environment/default as unlimited; default500 unchanged. INI/CLI only override when supplied. Shared-library/x86 stdcall export and backend documentation included.

20files (+536/-7). No Harbour/RDDADS or portal consumers, HTTP endpoint/listener, lock/count-cache/OPENADS_FRESH_COUNTS change, daemon-hardening exemption, CI/workflow or release change.

Caveats: management remains existing plainTCP (including credentials), not TLS merely because data transport is TLS-enabled. Snapshots are best-effort and may include the management session. Workareas include client-parked server handles, not Harbour Select() areas/OSFDs. Unknown rejection/worker-peak/parked-client metrics are null; other maxima retain existing process-global telemetry semantics and resource counts retain32-bit widths.

Credit: scoped derivation from Pritpal Bedi's released mtfix41 source6dffce5805fe9bc3822d630f46ed02b26286206e, adapted to upstream safeguards with added old-server/malformed-reply/config-source tests. No full-source identity claim.

Validation: isolated Linux normal/TLS unit+ACE+serverd builds complete; combined stage4+5+6 selection182cases/10,115assertions each. StrictClang14 warning checks pass changed Linux translation units/tests. Realdaemon JSON probes verify default/env/INI/CLI cap and source precedence, including explicitzero. Independent env probes cover invalid/negative/overflow fallback. Export verified in normal/TLS sharedlibs. Windows/macOS source-reviewed but not locally compiled/run; fullCTest/hostedCI not claimed

@bedipritpal
bedipritpal merged commit 8eab6ec into FiveTechSoft:main Oct 10, 2026
11 checks passed
@bedipritpal
bedipritpal deleted the port/health-backend-upstream branch October 10, 2026 04:05
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