Skip to content

Commit 1b2fa3a

Browse files
committed
coderabbit suggestions
1 parent ff17445 commit 1b2fa3a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/handlers/http/logstream.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,19 @@ pub async fn get_stream_hot_tier(stream_name: Path<String>) -> Result<impl Respo
445445
};
446446
let meta = hot_tier_manager.get_hot_tier(&stream_name).await?;
447447

448+
let mut stream_metadata: ObjectStoreFormat = serde_json::from_slice(
449+
&PARSEABLE
450+
.metastore
451+
.get_stream_json(&stream_name, false)
452+
.await?,
453+
)?;
454+
stream_metadata.hot_tier_enabled = false;
455+
456+
PARSEABLE
457+
.metastore
458+
.put_stream_json(&stream_metadata, &stream_name)
459+
.await?;
460+
448461
Ok((web::Json(meta), StatusCode::OK))
449462
}
450463

src/storage/object_storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ pub async fn commit_schema_to_storage(
989989
schema,
990990
serde_json::from_slice::<Schema>(&stream_schema)?,
991991
])
992-
.unwrap();
992+
.map_err(|e| ObjectStorageError::Custom(e.to_string()))?;
993993

994994
PARSEABLE
995995
.metastore

0 commit comments

Comments
 (0)