From 393ea44de06e328a26821ae6a9c448b76043c76e Mon Sep 17 00:00:00 2001 From: tison Date: Mon, 18 Mar 2024 11:18:01 +0800 Subject: [PATCH] docs: improve fn comments (#3526) Signed-off-by: tison --- src/api/src/helper.rs | 1 - src/store-api/src/logstore.rs | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/api/src/helper.rs b/src/api/src/helper.rs index ff4911e1a29c..c71bb0795cb3 100644 --- a/src/api/src/helper.rs +++ b/src/api/src/helper.rs @@ -707,7 +707,6 @@ pub fn pb_values_to_vector_ref(data_type: &ConcreteDataType, values: Values) -> } pub fn pb_values_to_values(data_type: &ConcreteDataType, values: Values) -> Vec { - // TODO(fys): use macros to optimize code match data_type { ConcreteDataType::Int64(_) => values .i64_values diff --git a/src/store-api/src/logstore.rs b/src/store-api/src/logstore.rs index 574d016263dd..d6ebcb2573c2 100644 --- a/src/store-api/src/logstore.rs +++ b/src/store-api/src/logstore.rs @@ -66,18 +66,17 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug { /// Lists all existing namespaces. async fn list_namespaces(&self) -> Result, Self::Error>; - /// Creates an entry of the associated Entry type - fn entry>(&self, data: D, entry_id: EntryId, ns: Self::Namespace) - -> Self::Entry; - - /// Creates a namespace of the associated Namespace type - // TODO(sunng87): confusion with `create_namespace` - fn namespace(&self, ns_id: NamespaceId, wal_options: &WalOptions) -> Self::Namespace; - /// Marks all entries with ids `<=entry_id` of the given `namespace` as obsolete, /// so that the log store can safely delete those entries. This method does not guarantee /// that the obsolete entries are deleted immediately. async fn obsolete(&self, ns: Self::Namespace, entry_id: EntryId) -> Result<(), Self::Error>; + + /// Makes an entry instance of the associated Entry type + fn entry>(&self, data: D, entry_id: EntryId, ns: Self::Namespace) + -> Self::Entry; + + /// Makes a namespace instance of the associated Namespace type + fn namespace(&self, ns_id: NamespaceId, wal_options: &WalOptions) -> Self::Namespace; } /// The response of an `append` operation.