Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve fn comments #3526

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
tisonkun marked this conversation as resolved.
Show resolved Hide resolved
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
tisonkun marked this conversation as resolved.
Show resolved Hide resolved
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