发布

  • [issue-5397] [BE] Make ClickHouse health check timeout configurable (#5414)

    frostbyte_neo 发布于 2026-04-07 17:16:52 +00:00

    • [issue-5397] [BE] feat: make ClickHouse health check timeout configurable

    Add ANALYTICS_DB_HEALTH_CHECK_TIMEOUT_SECONDS env var (default: 1) to
    allow overriding the hardcoded 1-second timeout in ClickHouseHealthyCheck.

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [issue-5397] [BE] cache Duration in ClickHouseHealthyCheck constructor

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [issue-5397] [BE] add healthCheckTimeoutSeconds to config-test.yml

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [issue-5397] [BE] address review: use Dropwizard Duration for healthCheckTimeout
    • Change healthCheckTimeout field type from int to Dropwizard Duration in
      DatabaseAnalyticsFactory, allowing flexible config values (e.g. 1s, 500ms)
    • Rename @Named binding to snake_case "health_check_timeout"
    • Update config.yml and config-test.yml to use Duration string format
    • Env var renamed from ANALYTICS_DB_HEALTH_CHECK_TIMEOUT_SECONDS to
      ANALYTICS_DB_HEALTH_CHECK_TIMEOUT

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Address reviewer suggestions: rename binding and simplify Duration conversion
    • Rename @Named binding from "health_check_timeout" to "clickhouse_health_check_timeout" for clarity (per andrescrz)
    • Replace manual Duration.ofMillis(toMilliseconds()) with toJavaDuration() (per andrescrz)

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com


    Co-authored-by: Douglas Blank doug@comet.com
    Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com
    Co-authored-by: Andres Cruz andresc@comet.com

    下载附件