feat(gossip): schema cache convergence topic

Adds a new topic to be used for schema cache convergence messages.
pull/24376/head
Dom Dwyer 2023-08-30 16:58:44 +02:00
parent 8751720f1f
commit c2d50c0a95
No known key found for this signature in database
GPG Key ID: E4C40DBD9157879A
1 changed files with 8 additions and 0 deletions
generated_types/src

View File

@ -109,6 +109,10 @@ pub mod influxdata {
/// Parquet file creation notifications.
NewParquetFiles = 2,
/// Schema cache consistency check / sync / convergence
/// messages.
SchemaCacheConsistency = 4,
}
impl TryFrom<u64> for Topic {
@ -118,6 +122,9 @@ pub mod influxdata {
Ok(match v {
v if v == Self::SchemaChanges as u64 => Self::SchemaChanges,
v if v == Self::NewParquetFiles as u64 => Self::NewParquetFiles,
v if v == Self::SchemaCacheConsistency as u64 => {
Self::SchemaCacheConsistency
}
_ => return Err(format!("unknown topic id {}", v).into()),
})
}
@ -328,6 +335,7 @@ mod tests {
match topics[0] {
Topic::SchemaChanges => {}
Topic::NewParquetFiles => {}
Topic::SchemaCacheConsistency => {}
}
}
}