Merged
Conversation
#136) Users ingesting rsyslog messages or data with non-UTF-8 characters experienced DuckDB query errors. This adds automatic UTF-8 sanitization during ingestion. Changes: - Add SanitizeUTF8() function that replaces invalid UTF-8 bytes with U+FFFD - Apply sanitization to MessagePack string fields (columnar and row formats) - Apply sanitization to Line Protocol string field values - Batch-level warning logs when sanitization occurs Performance: - Valid UTF-8 (99%+ of data): ~6-25ns overhead, zero allocations - Invalid UTF-8 (rare): ~150-230ns with minimal allocations
Extended timestamp auto-detection to recognize nanosecond precision, which is particularly important for users migrating from InfluxDB. Previously, nanosecond timestamps (19-digit values) were incorrectly treated as microseconds, resulting in dates far in the future. Detection ranges: - Seconds: < 1e10 (10 digits) → multiply by 1,000,000 - Milliseconds: < 1e13 (13 digits) → multiply by 1,000 - Microseconds: < 1e16 (16 digits) → no conversion - Nanoseconds: >= 1e16 (19 digits) → divide by 1,000 Note: Line Protocol already correctly handles nanoseconds per InfluxDB spec.
Added benchmarks to compare different fast-path strategies for UTF-8 validation. Results show Go's utf8.ValidString() is already SIMD-optimized and outperforms naive byte-scanning approaches. Benchmark results on M3 Max: - utf8.ValidString (short ASCII): 6.2 ns - utf8.ValidString (long ASCII): 10.3 ns - hasHighBit byte scan (short): 10.9 ns - hasHighBit byte scan (long): 41.5 ns Conclusion: Current implementation is already optimal.
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.
No description provided.