Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove conversion step in validator #25515

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions influxdb3_write/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,14 @@ mod test_helpers {
let db_name = NamespaceName::new(db_name).unwrap();
let result = WriteValidator::initialize(db_name.clone(), catalog, 0)
.unwrap()
.v1_parse_lines_and_update_schema(lp, false)
.unwrap()
.convert_lines_to_buffer(
.v1_parse_lines_and_update_schema(
lp,
false,
Time::from_timestamp_nanos(0),
Gen1Duration::new_5m(),
Precision::Nanosecond,
);
)
.unwrap()
.convert_lines_to_buffer(Gen1Duration::new_5m());

result.valid_data
}
Expand Down
19 changes: 10 additions & 9 deletions influxdb3_write/src/write_buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ impl WriteBufferImpl {
self.catalog(),
ingest_time.timestamp_nanos(),
)?
.v1_parse_lines_and_update_schema(lp, accept_partial)?
.convert_lines_to_buffer(ingest_time, self.wal_config.gen1_duration, precision);
.v1_parse_lines_and_update_schema(lp, accept_partial, ingest_time, precision)?
.convert_lines_to_buffer(self.wal_config.gen1_duration);

// if there were catalog updates, ensure they get persisted to the wal, so they're
// replayed on restart
Expand Down Expand Up @@ -267,8 +267,8 @@ impl WriteBufferImpl {
self.catalog(),
ingest_time.timestamp_nanos(),
)?
.v3_parse_lines_and_update_schema(lp, accept_partial)?
.convert_lines_to_buffer(ingest_time, self.wal_config.gen1_duration, precision);
.v3_parse_lines_and_update_schema(lp, accept_partial, ingest_time, precision)?
.convert_lines_to_buffer(self.wal_config.gen1_duration);

// if there were catalog updates, ensure they get persisted to the wal, so they're
// replayed on restart
Expand Down Expand Up @@ -560,13 +560,14 @@ mod tests {
let lp = "cpu,region=west user=23.2 100\nfoo f1=1i";
WriteValidator::initialize(db_name, Arc::clone(&catalog), 0)
.unwrap()
.v1_parse_lines_and_update_schema(lp, false)
.unwrap()
.convert_lines_to_buffer(
.v1_parse_lines_and_update_schema(
lp,
false,
Time::from_timestamp_nanos(0),
Gen1Duration::new_5m(),
Precision::Nanosecond,
);
)
.unwrap()
.convert_lines_to_buffer(Gen1Duration::new_5m());

let db = catalog.db_schema_by_id(DbId::from(0)).unwrap();

Expand Down
Loading