Skip to content

Commit

Permalink
docs: improve fn comments (#3526)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Mar 18, 2024
1 parent 44731fd commit 393ea44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/api/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Value> {
// TODO(fys): use macros to optimize code
match data_type {
ConcreteDataType::Int64(_) => values
.i64_values
Expand Down
15 changes: 7 additions & 8 deletions src/store-api/src/logstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,17 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug {
/// Lists all existing namespaces.
async fn list_namespaces(&self) -> Result<Vec<Self::Namespace>, Self::Error>;

/// Creates an entry of the associated Entry type
fn entry<D: AsRef<[u8]>>(&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<D: AsRef<[u8]>>(&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.
Expand Down

0 comments on commit 393ea44

Please sign in to comment.