Skip to content

typed_kv::adapter should use Buffer #4480

Closed

Description

@Xuanwo

We should use Buffer in typed_kv:

  • Store Buffer in Value

pub struct Value {
/// Metadata of this value.
pub metadata: Metadata,
/// The corresponding content of this value.
pub value: Bytes,
}

  • Return Buffer as reader

type Reader = Bytes;
type BlockingReader = Bytes;

  • Use QueueBuf in writer

pub struct KvWriter<S> {
kv: Arc<S>,
path: String,
op: OpWrite,
buf: Option<Vec<u8>>,
value: Option<Value>,
}

Activity

  1. self-assigned this
    on Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions