Skip to content

Commit b618c47

Browse files
updated comments and styling changes
1 parent c26b6b1 commit b618c47

File tree

5 files changed

+9
-21
lines changed

5 files changed

+9
-21
lines changed

src/catalog/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,19 +450,14 @@ pub async fn get_first_event(
450450
/// first event timestamp if found, `Ok(None)` if no timestamps are found, or an `ObjectStorageError`
451451
/// if an error occurs.
452452
///
453-
/// # Errors
454-
///
455-
/// This function will return an error if:
456-
/// * The stream metadata cannot be retrieved from the storage.
457-
///
458453
/// # Examples
459454
/// ```ignore
460455
/// ```rust
461456
/// let result = get_first_event_from_storage("my_stream").await;
462457
/// match result {
463458
/// Ok(Some(first_event)) => println!("first-event-at: {}", first_event),
464459
/// Ok(None) => println!("first-event-at not found"),
465-
/// Err(e) => eprintln!("Error retrieving first-event-at from storage: {}", e),
460+
/// Err(err) => println!("Error: {:?}", err),
466461
/// }
467462
/// ```
468463
pub async fn get_first_event_from_storage(

src/event/format/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ impl EventFormat for Event {
9494
};
9595

9696
if value_arr
97-
.iter()
98-
.any(|value| fields_mismatch(&schema, value, schema_version))
97+
.iter()
98+
.any(|value| fields_mismatch(&schema, value, schema_version))
9999
{
100100
return Err(anyhow!(
101101
"Could not process this event due to mismatch in datatype"

src/event/format/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,8 @@ pub trait EventFormat: Sized {
112112
time_partition: Option<&String>,
113113
schema_version: SchemaVersion,
114114
) -> Result<(RecordBatch, bool), AnyError> {
115-
let (data, mut schema, is_first) = self.to_data(
116-
storage_schema,
117-
time_partition,
118-
schema_version,
119-
)?;
115+
let (data, mut schema, is_first) =
116+
self.to_data(storage_schema, time_partition, schema_version)?;
120117

121118
if get_field(&schema, DEFAULT_TIMESTAMP_KEY).is_some() {
122119
return Err(anyhow!(

src/handlers/http/modal/ingest_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl IngestServer {
249249
web::put()
250250
.to(ingestor_logstream::put_stream)
251251
.authorize_for_stream(Action::CreateStream),
252-
)
252+
),
253253
)
254254
.service(
255255
// GET "/logstream/{logstream}/info" ==> Get info for given log stream

src/metadata.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ impl StreamInfo {
224224

225225
/// Removes the `first_event_at` timestamp for the specified stream from the LogStreamMetadata.
226226
///
227-
/// This function acquires a write lock, retrieves the LogStreamMetadata for the given stream,
228-
/// and removes the `first_event_at` timestamp if it exists.
227+
/// This function is called during the retention task, when the parquet files along with the manifest files are deleted from the storage.
228+
/// The manifest path is removed from the snapshot in the stream.json
229+
/// and the first_event_at value in the stream.json is removed.
229230
///
230231
/// # Arguments
231232
///
@@ -236,11 +237,6 @@ impl StreamInfo {
236237
/// * `Result<(), MetadataError>` - Returns `Ok(())` if the `first_event_at` timestamp is successfully removed,
237238
/// or a `MetadataError` if the stream metadata is not found.
238239
///
239-
/// # Errors
240-
///
241-
/// This function will return an error if:
242-
/// * The stream metadata cannot be found.
243-
///
244240
/// # Examples
245241
/// ```ignore
246242
/// ```rust

0 commit comments

Comments
 (0)