* fix(lp parser): improves the error message when parsing tagsets
A tagset is an optional list of (tag_key=tag_value) that start
immediatelly after the measurement. The tagset and measurement are
separated by a comma. If that comma is present, at least one tag=value
pair must be present.
This pr expresses that must relationship and provides a Tag Set
Malformed erorr now if there's something wrong with the tag set.
The input test case is added which is missing the tag value - I'd like
to improve the errors to be more specific still, but one case at a time.
* fixes#7772
* chore: add test case
This commit adds a test case for a comma after the measurement but no
tagset thereafter. This is also an error condition. Before this PR this
was accepted as an empty tagset, but the spec and the canonical golang
parser do not permit this.
This commit fixes loads of crates (47!) had unused dependencies, or
mis-configured dependencies (test deps as normal deps).
I added the "unused_crate_dependencies" to all crates to help prevent
this mess from growing again!
https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.UNUSED_CRATE_DEPENDENCIES.html
This has the minor downside of false-positives when specifying
dev-dependencies for test/bench binaries - these are files in /test or
/benches (not normal tests). This commit includes a workaround,
importing them in lib.rs (gated by a feature flag). I think the
trade-off of better dependency management is worth it!
* test: add tests for the desired contract for parsing measurements from line protocol
* fix: restrict null chars in measurement
* chore: make an explicit Measurement type
* refactor: have iox lp parser match influxdb contract, for acceptance of eq in measurements
* test: create end_to_end test to confirm same write-then-read behavior with `=` in measurements, is the same as influxdb
* chore(influxdb_line_protocol): Remove ffi feature
* chore(influxdb_line_protocol): Remove workspace dependencies
* docs(influxdb_line_protocol): add initial readme and release instructions
* chore: Run cargo hakari tasks
* chore: Exclude influxdb_line_protocol from hakari checks and the workspace hack features
* feat: Add a link to nom in the docs
* docs: Copy edit documentation and comments
* fix: Mark the line protocol Error as non-exhaustive
So that we can easily add more error variants in the future.
* fix: Remove some functions from the public API
* fix: Make split_lines pub again
Oops, we're actually depending on this being pub in other parts of IOx
🙈
* docs: Add doc comments so everything on the crate docs page has a description
* chore: Add homepage, readme and repo links
* fix: use cargo-rdme
* chore: Add comment to hakari.toml
* chore: Increase version to `1.0.0`
* fix: fix LineProtocolBuilder link
---------
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* chore: Upgrade to Rust 1.68
* fix: Remove unnecessary into_iter, thanks Clippy!
* fix: Use the size of the type, not a reference to the type... oops.
Thanks clippy!
* fix: Return block directly instead of creating a variable
Thanks clippy!
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: Upload in small chunks and in parallel
* fix: doclink
* fix: Apply suggestions from code review
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
* fix: Update influxdb_iox_client/src/client/write.rs
* fix: fixup error handling and fmt
* fix: Make default chunk sizes the same and add docs
* fix: clippy
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Can be useful to call the IOx LP parser from other processes, for example from Go.
I used it to run an online comparison of IOx and influxdb Go LP parser in order to identify compatibility
issues.
This commit allows the LP consumer to correctly handle line protocol
writes that duplicate one or more fields or tags within a single line:
table v=2,bananas=42,v=3,platanos=24
▲ ▲
└───────┬──────┘
│
duplicate field "v"
This change implements the following logic when processing fields:
IF field is duplicated
IF all duplicate field values are of the same data type
use last occurrence ("last write wins")
ELSE
return an error
Any duplication of tags is rejected, and use of a field name as both a
field and a tag is remains forbidden (unchanged in this PR, a previously
agreed breaking change from TSM).
See https://github.com/influxdata/influxdb_iox/issues/4326 for context.
This feature was only recently added (it only works in Rust 1.49) and
potentially reduces the size of smallvecs. Doesn't seem like it could
hurt.
https://docs.rs/smallvec/1.7.0/smallvec/#union
This removes nom from the workspace-hack crate. I'm not sure what's
going on here as cexpr is setting default-features false but then
explicitly setting the features to be the same as nom's default
features, and cargo-hakari seems to be resolving that differently than
using nom's default features. I think this might be a bug in
cargo-hakari, going to investigate.
Connects to #3117.