You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "PsiACE (via GitHub)" <gi...@apache.org> on 2023/05/07 16:12:11 UTC
[GitHub] [incubator-opendal] PsiACE commented on a diff in pull request #2225: feat: migrate service dashmap
PsiACE commented on code in PR #2225:
URL: https://github.com/apache/incubator-opendal/pull/2225#discussion_r1186878585
##########
core/src/services/dashmap/backend.rs:
##########
@@ -70,45 +70,36 @@ impl Builder for DashmapBuilder {
}
/// Backend is used to serve `Accessor` support in dashmap.
-pub type DashmapBackend = kv::Backend<Adapter>;
+pub type DashmapBackend = typed_kv::Backend<Adapter>;
#[derive(Debug, Clone)]
pub struct Adapter {
- inner: DashMap<String, Vec<u8>>,
+ inner: DashMap<String, typed_kv::Value>,
}
#[async_trait]
-impl kv::Adapter for Adapter {
- fn metadata(&self) -> kv::Metadata {
- kv::Metadata::new(
- Scheme::Dashmap,
- &format!("{:?}", &self.inner as *const _),
- Capability {
- read: true,
- write: true,
- scan: true,
- ..Default::default()
- },
- )
+impl typed_kv::Adapter for Adapter {
+ fn metadata(&self) -> (Scheme, String) {
Review Comment:
Perhaps the capability check will be reintroduced in a later PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org