fix: correct critical bugs and improve pipe streaming performance
Critical bug fixes:
- save_item now returns real Item from database, not a hardcoded fake
- AsyncDataService::save() reuses self.sync_service instead of creating redundant instance
- GenerateStatus trait signature mismatch fixed (CLI/API decoupling)
Performance improvements (pipe path untouched):
- CompressionEngine::open() returns Box<dyn Read + Send> enabling true streaming
- mode_get eliminates triple full-file read (was sampling then re-reading entire file)
- FilteringReader adds fast-path bypass when no filters, pre-allocates temp buffer
- text.rs meta plugin processes &[u8] slice directly, eliminates data.to_vec() clone
API correctness:
- Tag parse errors now return 400 instead of being silently discarded
- compute_diff uses similar crate (LCS-based) instead of naive positional comparison
Cleanup:
- Modernize string formatting (format!({x})) across codebase
- Remove redundant DB query in get mode
- Derive Debug/ToSchema on public types
- Delete placeholder test files with no real assertions
- Extract parse_comma_tags utility function
This commit is contained in:
@@ -174,7 +174,7 @@ impl MetaPlugin for MetaPluginExec {
|
||||
if let Some(writer) = self.writer.as_mut()
|
||||
&& let Err(e) = writer.write_all(data)
|
||||
{
|
||||
error!("META: Exec plugin: failed to write to stdin: {}", e);
|
||||
error!("META: Exec plugin: failed to write to stdin: {e}");
|
||||
}
|
||||
MetaPluginResponse {
|
||||
metadata: Vec::new(),
|
||||
@@ -219,11 +219,11 @@ impl MetaPlugin for MetaPluginExec {
|
||||
}
|
||||
} else {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
error!("META: Exec plugin: command failed: {}", stderr);
|
||||
error!("META: Exec plugin: command failed: {stderr}");
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
error!("META: Exec plugin: failed to wait on process: {}", e);
|
||||
error!("META: Exec plugin: failed to wait on process: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user