influxdata / influxdata/influxdb

Ability to show shards from influx CLI for 2.x

Open
#22,911 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/2.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Proposal:

There should be a way to see the shards from a bucket in OSS - possibly a new CLI subcommand

Current behavior:

Internally we maintain a list of shards but there is no way to view it

Desired behavior:

  1. Add an optional list of shards to the buckets rest endpoint, it should not be present for cloud but for OSS it can give the list of shards for the bucket.
  • see 1.x 'SHOW SHARDS' output - should have at least shard id, start time, end time, and expiry for each shard.
  1. Display this information in the CLI (possibly with influx shards list -o myorg --bucket mybucket)

Alternatives considered:

  • Add to metrics - metrics aren't very reliable, it feels like this should be in the API

Use case:

  • Without visibility into existing shards it can be hard to debug retention policy enforcement.

Contributor guide

Open the 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.

Research direction

Start at the buckets REST endpoint and the influx CLI entry point, then compare the requested output with the 1.x SHOW SHARDS behavior. Done means OSS buckets can expose shard ID, start time, end time, and expiry, and the CLI can display that information for a selected organization and bucket without exposing it for Cloud.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, cli, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.