Skip to content

Commit eeb1aa7

Browse files
authored
feat: swap over to DbId and TableId everywhere (#25421)
* feat: Add TableId and ColumnId * feat: swap over to DbId and TableId everywhere This commit swaps us over to using the DbId and TableId types everywhere for our internal systems. Anywhere that's external facing, such as names for last cache tables or line protocol parsing, use names. In these cases we have the `Catalog` which keeps a map of TableIds and DbIds in a bidirectional mapping for easy lookup i.e. id <-> names. While in essence the change itself isn't that complicated given the nature of how much we depended on names for things, the changes end up being quite invasive and extensive. Luckily it shouldn't be too hard to review. Note this does not add the column ids which will be done in a follow up PR. Closes #25375 Closes #25403 Closes #25404 Closes #25405 Closes #25412 Closes #25413
1 parent 1cd930f commit eeb1aa7

34 files changed

+1201
-547
lines changed

Cargo.lock

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ assert_cmd = "2.0.14"
4848
async-trait = "0.1"
4949
backtrace = "0.3"
5050
base64 = "0.22.0"
51+
bimap = "0.6.3"
5152
byteorder = "1.3.4"
5253
bytes = "1.5"
5354
chrono = "0.4"

influxdb3/src/commands/serve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ pub async fn command(config: Config) -> Result<()> {
425425
.map_err(Error::InitializePersistedCatalog)?,
426426
);
427427

428-
let last_cache = LastCacheProvider::new_from_catalog(&catalog.clone_inner())
428+
let last_cache = LastCacheProvider::new_from_catalog(Arc::clone(&catalog))
429429
.map_err(Error::InitializeLastCache)?;
430430
info!(instance_id = ?catalog.instance_id(), "Catalog initialized with");
431431

influxdb3_catalog/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ influxdb3_wal = { path = "../influxdb3_wal" }
1717

1818
# crates.io dependencies
1919
arrow.workspace = true
20+
bimap.workspace = true
2021
parking_lot.workspace = true
2122
serde.workspace = true
2223
serde_json.workspace = true

0 commit comments

Comments
 (0)