fix: preserve multiline fields during import - #27596
Merged
gwossum merged 4 commits intoAug 25, 2026
Merged
Conversation
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Signed-off-by: 1fanwang <1fannnw@gmail.com>
gwossum
reviewed
Aug 21, 2026
gwossum
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR! This correctly identifies the issue, that influx import assumes 1 line == 1 point and disregards quoting.
My main request is to re-use models.scanLine instead of copying it. Most of the rest is matching the projects modern test code style, as well as a few questions.
Signed-off-by: 1fanwang <1fannnw@gmail.com>
gwossum
reviewed
Aug 24, 2026
gwossum
reviewed
Aug 24, 2026
gwossum
reviewed
Aug 24, 2026
gwossum
reviewed
Aug 24, 2026
gwossum
reviewed
Aug 24, 2026
gwossum
reviewed
Aug 24, 2026
gwossum
left a comment
Member
There was a problem hiding this comment.
Almost there! Just a couple of tweaks and this can get merged. I also added some non-blocking comments. Nothing needs to be done on those for approval.
Signed-off-by: 1fanwang <1fannnw@gmail.com>
gwossum
reviewed
Aug 25, 2026
| testImportRecords(t, []string{"test value=1i 1"}, false) | ||
| } | ||
|
|
||
| func TestImporter_FlushesBatchOnReadError(t *testing.T) { |
Member
There was a problem hiding this comment.
I like that a test was added for this.
gwossum
approved these changes
Aug 25, 2026
gwossum
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks for the PR, and congratulations on your first InfluxDB PR!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
influx_inspect exportpreserves literal newlines inside quoted string fields.influx -importcounted those physical lines toward its 5,000-line batch, so a batch could end inside a field and fail to round trip withunbalanced quotes.The importer now batches complete line-protocol records. Record framing uses
models.ScanLinefor quotes and escapes, rejects a single record above the server's default 25 MB request-body limit, and flushes valid records collected before a later read error.Fixes #27589
Testing
5,000-line red/green repro and package output
Required for all non-trivial PRs