Crate melange_db

Crate melange_db 

Source
Expand description

melange_db 是一个高性能嵌入式数据库, 在sled架构基础上进行了深度性能优化,目标超越RocksDB性能。

主要优化包括:

  • 增量序列化减少IO开销
  • 改进的缓存策略
  • 优化的flush机制
  • 更高效的内存管理

Modules§

block_cache
高性能块缓存系统
bloom_filter
高性能布隆过滤器实现
platform_utils
跨平台文件操作工具
simd_optimized
SIMD优化的key比较模块
smart_flush

Macros§

debug_log
调试级别日志 - 仅在debug模式下编译
error_log
错误级别日志 - 始终保留
info_log
信息级别日志 - 轻量级,仅在必要时使用
perf_trace
性能关键路径的零成本日志 使用条件编译确保在release模式下完全无开销
trace_log
追踪级别日志 - 仅在debug模式下编译
warn_log
警告级别日志 - 始终保留但优化

Structs§

Batch
A batch of updates that will be applied atomically to the Tree.
CollectionId
CompareAndSwapError
比较并交换错误
CompareAndSwapSuccess
比较并交换成功
Config
Db
melange_db - 高性能嵌入式数据库
InlineArray
A buffer that may either be inline or remote and protected by an Arc. The inner buffer is guaranteed to be aligned to 8 byte boundaries.
Iter
Object
ObjectId
Stats
Tree
melange_db 的树结构,提供高性能的键值存储操作

Enums§

CacheWarmupStrategy
CompressionAlgorithm
压缩算法枚举

Functions§

cleanup_lock_files
清理指定路径的数据库锁文件
open
使用默认配置在指定路径打开一个 Db 这将在指定路径创建一个新的存储目录(如果它不存在) 您可以使用 Db::was_recovered 方法来确定数据库是否从之前的实例中恢复

Type Aliases§

CompareAndSwapResult
比较并交换结果