Skip to content

Commit

Permalink
feat: Add paths module to influxdb3_write (#24579)
Browse files Browse the repository at this point in the history
This commit introduces 4 new types in the paths module for the
influxdb3_write crate. They are:

- ParquetFilePath
- CatalogFilePath
- SegmentInfoFilePath
- SegmentWalFilePath

Each of these corresponds to an object store path and for the WAL file an
on disk path that we can use to address the needed files in a consistent way
and not need to have path construction be duplicated to address these files.

These types also Deref/AsRef to the object_store::path::Path type (or the
std::path::Path type for the Wal) so that they can be used in places that
expect the type such as various object_store/std::fs and so that we can use
the underlying type's methods without needing to implement them for each
type as they are just a thin wrapper around those types.

This commit adds some tests to make sure that the path construction
works as intended and also updates the `wal.rs` file to use the new
`SegmentWalFilePath` instead of just a `PathBuf`.

Closes: #24578
  • Loading branch information
mgattozzi authored Jan 19, 2024
1 parent 58bec1d commit e13cc47
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 90 deletions.
Loading

0 comments on commit e13cc47

Please sign in to comment.