Validate the cluster config durations which accept zero

Open
#238 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #239 by @ShahadatTest — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with validate in tellus/src/cluster/endpoint.rs and validate in bootstrap.rs, which already reject zero intervals, and copy that pattern. For each listed duration, decide whether zero is meaningful, then either add a variant to InvalidEndpointConfig, InvalidBootstrapConfig or the provider's error and check it in the same place, or document zero in the field's doc comment. Done means every listed key is handled, a test sits beside the existing zero-interval tests, and the Constraint column in docs/cluster.md is filled.

Written by the indexing model from the issue text.

Description

good first issue

Most cluster configuration is validated when it is constructed or deserialized: validate in tellus/src/cluster/endpoint.rs refuses a zero heartbeat_interval or watch_refresh_interval (InvalidEndpointConfig::ZeroHeartbeatInterval, ZeroWatchRefreshInterval), validate in bootstrap.rs a zero resolve_interval or probe_interval, and the failure detector a zero deadline or min_std_deviation.

These durations accept zero without any check:

  • EndpointConfig: down_retention, leave_timeout, ambiguous_join_bound
  • failure_detector.phi_accrual: acceptable_pause, warmup_deadline
  • downing_provider.keep_majority.after, downing_provider.down_after_deadline.after
  • BootstrapConfig: settle
  • formation.majority_with_fallback.after

For each of them, decide whether zero is meaningful:

  • If it is not, refuse it the way the existing checks do: a new variant of the config's error type (InvalidEndpointConfig, InvalidBootstrapConfig or the provider's error), checked in the same place, so both the constructor path and deserialization refuse it. Add a test next to the existing ones for the zero intervals.
  • If it is, document what zero means in the field's doc comment.

Then update the Configuration table in docs/cluster.md, whose Constraint column is empty for exactly these keys.

Dominant language
Rust
Stars
37
Forks
1
Avg merge
6h 36m
Merged PRs (30d)
123

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tellus-rs/tellus

All issues in tellus-rs/tellus

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.