influxdata / influxdata/influxdb

Improve semantics of the `influxdb3 write` CLI for partial write behaviour

Open
#25,825 0 comments 0 reactions 1 assignee Claimed by @waynr View on GitHub
v3
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

### Problem statement

The semantics of the `influxdb3 write` CLI are confusing with respect to the `--accept-partial` flag. That there is an `--accept-partial` flag implies that the default behaviour is to _not_ accept partial writes.

However, the default behaviour _is_ to accept partial writes, so when the `--accept-partial` arg is not provided, partial writes _will_ be accepted and this can be confusing for users.

### Proposed solution

Replace the `--accept-partial` flag with the following: `--deny-partial-writes`, whose behaviour is as follows:
* Is a flag, i.e., does not require a `true` or `false` to be passed as an argument
* When included as a flag in the CLI command, passes `accept_partial: false` in the API request to make the write.
* Update the CLI docs to describe this new behaviour
* Add tests to verify the new behaviour in the [`cli` test suite](https://github.com/influxdata/influxdb/blob/624e67e95cdb84bced121ba8b9ac69f37889c7bd/influxdb3/tests/server/cli.rs)

The default behaviour, as is the case in the underlying `/api/v3/write_lp` API is to accept partial writes.

### Alternatives considered

N/A

### Additional context

The CLI is implemented here: https://github.com/influxdata/influxdb/blob/624e67e95cdb84bced121ba8b9ac69f37889c7bd/influxdb3/src/commands/write.rs#L34-L38

Slack thread ([link](https://influxdata.slack.com/archives/C084G9LR2HL/p1736791230954149?thread_ts=1736730381.381219&cid=C084G9LR2HL)).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.