安装部署需参照官方文档,README 未提供可直接执行的命令;存储依赖独立的 Dingo-Store 项目,部署时需一并考虑;开发贡献需从 develop 分支拉出特性分支并遵循 Google 代码风格
dingo
dingodbApache-2.0活跃维护兼容 MySQL 的多模态向量数据库,用统一 SQL 同时查询结构化与非结构化数据,支持向量 upsert 和检索,主打高并发、超低延迟。
A multi-modal vector database that supports upserts and vector queries using unified SQL (MySQL-Compatible) on structured and unstructured data, while meeting the requirements of high concurrency and ultra-low latency.
README 未给出直接安装命令,仅指向 Docker 与 Ansible 部署文档:https://dingodb.readthedocs.io/en/latest/deployment/cluster/deploy_in_single_node_using_docker.htmlREADME 未说明具体显存、CPU 或 GPU 型号要求,仅提及支持磁盘向量检索以降低内存消耗
兼容 MySQL 协议的分布式多模态向量数据库,用统一 SQL 同时处理结构化与向量数据
兼容 MySQL 的多模态向量数据库,用统一 SQL 同时查询结构化与非结构化数据,支持向量 upsert 和检索,主打高并发、超低延迟。
核心能力
- 用统一 SQL 同时查询标量与向量数据
- 支持标量向量混合检索与结果融合
- 实时构建标量与向量索引并后台自动优化
- 数据分片自动分裂合并,支持弹性伸缩
- 支持基于磁盘的向量检索,冷热分层降低内存占用
容易踩的坑
- v0.9.0Release Notes v0.9.0最新正式版2024-06-14 · 2024-06-14 10:08 UTC
Release Notes v0.9.0
1. New Features
1)License Management Mechanism
Introduced a License management feature to protect DingoDB's intellectual property. With the License activation and management tools, users can easily manage and monitor software usage, ensuring legal and compliant use.
2)Single Machine Lite Version of DingoDB
Implemented a Single Machine Lite version of DingoDB, lowering the usage threshold for users. This version can run on a single machine without complex distributed deployment, making it ideal for development, testing, and small-scale application scenarios, helping users quickly get started and validate DingoDB's capabilities.
3)New C++ SDK
Provided a new C++ SDK to facilitate secondary development and integration for developers. The SDK offers a rich set of APIs that support efficient data operations and management, enhancing development efficiency.
2. Feature Optimizations
2.1 Storage Layer Optimization
1)Braft Modification
Added support for controlling election priority among peers, addressing the vector index Leader balancing issue. This helps improve cluster stability and performance, avoiding single-point overloads.
2)Prefilter Performance Enhancement
Adjusted the data structure of ScalarData to improve pre-filtering rates. Through data structure optimization, DingoDB can process data filtering faster, reducing query latency.
3)Instruction Set Expansion
In addition to the default SSE instructions for vector distance calculation functions FAISS and HNSWLIB, added support for AVX2/AVX512 instruction sets. By expanding the instruction set, vector computation efficiency is improved, particularly in high-performance computing environments.
4) Vector Distance Calculation Performance Improvement
Implemented runtime CPU instruction set acceleration switching, significantly enhancing vector distance calculation performance. The system automatically switches instruction sets (e.g., SSE, AVX2, AVX512) as needed, especially effective in handling large-scale datasets.
5)Leader Balance Rate Improvement
Optimized algorithms to improve the balance rate of Leaders in the cluster. The improved election algorithm ensures a more balanced distribution of Leaders, enhancing the overall system performance.
6)Vector Index Data Insertion Performance Improvement
Optimized the insertion performance of IVF_FLAT and IVF_PQ vector indexes. The improved insertion algorithm increases data insertion efficiency, reducing index build time.
7)Synchronization Operation Performance Optimization
Optimized the synchronization performance of BThread and PThread. By reducing the overhead of thread synchronization, the performance in multi-threaded environments is enhanced.
8)Vector Search Performance Improvement
Adjusted parameters such as Region size, Region count, and number of threads to effectively improve vector search performance. Optimized resource allocation significantly boosts search response speed and efficiency.
2.2 Computation Layer Optimization
1)Log System Optimization
Revamped the Executor layer log system to provide full-link log information, enhancing log traceability. The improved log system records more detailed information, helping users comprehensively monitor and analyze various events during task execution.
2)Observable Metrics
Introduced a new Metric information statistics feature to monitor job metrics at various stages, enhancing task observability. By monitoring performance metrics in real time, users can better understand task execution and performance bottlenecks, improving system operation and maintenance efficiency.
- v0.8.0Release Notes v0.8.02024-03-20 · 2024-03-20 17:24 UTC
查看更新说明
Release Notes v0.8.0
Major New Features
1. Distributed Transaction
The addition of distributed transaction capabilities meets the core ACID features of the database, ensuring the integrity and reliability of the database, and expands the range of applications.
- Transaction-related interfaces are added to the Store layer/Index layer/Executor layer.
- Provides the ability for garbage collection of distributed transaction data, cleaning up completed and no longer needed transaction data, freeing up storage space, and reducing storage space occupancy.
- Transaction table creation: When creating a table, specify ENGINE=LSM_TXN to complete the creation.
- Transaction commit methods:
- Explicit commit: Use the COMMIT command to complete the commit.
- Implicit commit: Use SQL commands (BEGIN, START TRANSACTION, etc.) to indirectly complete the commit.
- Auto commit: After INSERT/UPDATE/DELETE execution, the system automatically completes the commit.
- Three transaction isolation levels: Read Committed, Repeatable Read.
- Two transaction modes: Optimistic and Pessimistic.
- Transaction locking mech anism: Provides table-level and row-level lock management. By locking tables/rows, it ensures transaction consistency and isolation, effectively avoiding data conflicts between concurrent transactions.
- Deadlock detection mechanism: Supports periodic checking of lock resources and waiting relationships in the system to identify potential deadlock situations.
2. Compute Pushdown
- Refactoring of compute pushdown, optimizing code execution logic, and improving data query performance.
- Supports expression compute pushdown, handling execution with expression syntax to improve computational efficiency.
- Supports Vector ScalarData operator pushdown: When performing vector approximate nearest neighbor search, filters scalar data to further select data that meets specific conditions.
- Python SDK introduces the Self Query feature, providing filtering capabilities for vector data Scalar Data, satisfying specific query vector data scenarios.
Product Feature Enhancements
1. Data Storage Layer
1.1 Architecture optimization
- Added encapsulation for google::protobuf::Closure to facilitate request statistics and log tracking.
- Refactored the RawRocksEngine class by splitting it into multiple files based on functionality and supporting multi-column family mode to address the bloated issues of the current RawRocksEngine.
- Refactored the StoreService/IndexService modules to unify the logic inside and outside the queue.
- Refactored the Storage class by extracting the execution queue logic and placing it in the traffic control module.
1.2 Region Management (Merge & Split):
- Optimized the region split strategy by introducing backward region splitting in addition to the existing strategy.
- Added region merge functionality to the Store layer/Coordinator layer to dynamically adjust data and optimize storage space utilization.
- Supported splitting in multi-column family mode, greatly improving scalability, performance, and reliability. Adopted a unified encoding format compatible with key encoding formats for distributed transactions.
1.3 Vector Indexing
- Based on retrieval speed, a new IVF_FLAT vector indexing method based on inverted indexes is added, which is suitable for high-dimensional sparse vector data. It provides fast retrieval speed and good retrieval performance.
- Based on memory, a new IVF_PQ vector indexing method is added, which is based on inverted indexes and product quantization. It is suitable for high-dimensional dense vector data and offers good search speed and low storage overhead.
- Based on accuracy, a new BruteForce index is added, which is suitable for small-scale vector datasets or scenarios that require high search accuracy.
1.4 Storage Engines
- Added B+Tree engine to optimize database query performance.
- Added XDP engine to achi
- v0.7.0Release Notes v0.7.02023-10-15 · 2023-10-15 08:20 UTC
查看更新说明
Release Notes v0.7.0
1.Store Storage Layer
1.1 Distributed Storage
- Provide the ability to manage IndexRegions, supporting dynamic creation and deletion of IndexRegions.
- Add functionality for Raft Snapshot creation and installation for IndexRegions, which helps generate and load snapshot data for IndexRegions, enhancing system reliability and recovery capabilities.
- Introduce the Build, Rebuild, and Load functions for VectorIndex to enable efficient creation, reconstruction, and loading of vector indexes, facilitating similarity search of vector data.
- Enhance the management capability of IndexRegion for capacity expansion and contraction, enabling dynamic adjustment of index size to accommodate changes in data scale.
- Support automatic splitting of VectorIndex/ScalarIndex Regions for region partitioning based on data load and distribution.
- Introduce a mechanism to load indexes only on the leader (saving memory), by concentrating index loading and maintenance tasks on the leader node to reduce memory consumption on other nodes.
1.2 Vector Index
- Provide the ability to manage vector indexes, including operations such as creation, deletion, and querying of vector indexes.
- Offer diverse types of vector indexes, including HNSW, FLAT, IVF_FLAT, and IVF_PQ.
- Support read and write operations for scalar data, enabling mixed storage and fusion analysis of multimodal data.
- Enable top-N similarity search capability.
- Allow precise lookup based on ID.
- Provide the ability to perform batch queries based on specified offsets.
- Support pre-filtering in vector search by passing a scalar key during VectorSearch operation.
- Support post-filtering in vector search by passing a scalar key during VectorSearch operation.
1.3 Scalar Index
- Support the creation of indexes on non-vector columns, providing more efficient query and retrieval capabilities for non-vector data.
- Provide the ability to manage scalar indexes, including operations such as creation, deletion, and querying of scalar indexes.
- Support LSM Tree-type ScalarIndex, using LSM Tree as the underlying storage structure to build ScalarIndex.
1.4 Distributed Lock
- Implement the Lease mechanism for distributed locks, allowing clients to acquire, release, and maintain distributed locks by managing the lifecycle and renewal of leases.
- Support MVCC (Multi-Version Concurrency Control) for key-value storage: The Coordinator stores all change records for each key-value pair and generates a globally unique revision for each change.
- Provide a simple and efficient OneTimeWatch mechanism for event notification scenarios that only require triggering once.
2. Executor Execution Layer
2.1 Data Types
- Extend the Float data type to support high-dimensional data storage and processing for supporting vector databases.
2.2 SQL Syntax
- Extend the CREATE TABLE statement to support creating scalar tables and vector tables.
- Add new vector index query functions for retrieving vector data.
- Introduce functions for text and image vectorization, converting text and images into vector representations.
2.3 SQL Optimizer
- Support mapping statistics to Calcite selectivity calculations to accurately estimate query costs and select the optimal execution plan, thereby improving query performance and efficiency.
- Support different types of statistics: general statistics (e.g., Integer, Double, Float), cm_sketch, histograms, and Calcite's default calculation for all types.
- Introduce the ANALYZE TABLE command to collect statistics information, notifying the optimizer to collect and update statistics for specified tables.
- Provide a custom CostFactory to implement RelOptCost, redefine interfaces such as isLe, isLt, multiply, plus, and minus.
- Rewrite Dingo TableScan cost calculation.
- Modify DingoLikeScan selectivity
- v0.6.0Release Notes v0.6.02023-06-18 · 2023-06-18 15:38 UTC
查看更新说明
Release Notes v0.6.0
1 架构层
1.1 存储计算分离
1. 计算引擎(Executor):接收基于MySQL协议和DingoDB自有协议的SQL,进行SQL解析、逻辑计划和执行计划生成,对接低层Store存储。 2. 分布式存储引擎(Store):基于C++的高效分布式存储。整个存储层分为元数据存储和数据存储;存储层设计采用灵活扩展的方式,进行多种存储引擎的扩展,如Rocksdb, memory, xdp-rocks等。 3. 支持计算下推操作:为了高效的提升聚合、过滤操作带来的价值,提升计算的效率,存储层支持计算下推的逻辑实现;支持filter,count,sum, min, max等操作。1.2 Raft升级
1. 提供Leader选举机制,支持多节点选举; 2. 提供日志复制,保证了系统的可靠性,有效防止数据丢失。 3. 提供高性能的Raft,采用多线程和异步IO,提高了系统的吞吐量和响应速度。 4. 提供Snapshot机制,用于恢复状态机的状态。能够减少日志的大小,从而提高性能,还可以用于在节点故障时快速恢复状态机的状态。 5. 提供集群扩缩容迁移能力,能够在不影响整个系统的稳定性和一致性前提下更加容易地添加或删除节点。1.3 协议层支持MySQL协议
1. 提供MySQL Shell这种交互式命令行工具,用于高效管理和操作MySQL数据库;同时支持SSL加密,保证数据库的安全性。 2. 提供MySQL JDBC Driver 数据库连接驱动程序, 通过Java应用程序中的JDBC API访问MySQL数据库,用于连接和操作MySQL数据库。1.4 集群运维监控
1. 提供可视化监控,涉及grafana监控、http监控,实现集群节点(磁盘、CPU、IO等)、表(分区、Region)、Region监控、raft group监控 2. 提供多种部署方案:单点、docker-compose、ansible多节点部署 3. 提供了集群在线扩容、缩容方案,进行集群扩缩容操作。2 功能层
2.1 Common公共和基础模块
1. 支持手动调整日志级别,可以根据实际场景需要灵活地控制日志地详细程度,减少日志文件的大小和存储成本。 2. 优化Store & Dingo Client端错误码 3. 支持C++版本的数据序列化,将序列化后的数据按照序列化时的格式解析,然后将解析后的数据还原为原始数据,2.2 Raft管理和分布式存储
1. 提供Snapshot机制,用于恢复状态机的状态。 2. 支持Region Split,当某个Region超过最大限制,系统自动将其分裂成多个Region,保证各个Region大小接近,有利于进行调度决策。 3. 支持Region Merge,当某个Region因为大量删除导致Region的大小变小是,系统会将较小的两个相邻Region进行合并。 4. 优化了Range范围校验规则,提高代码执行效率,从而缩短数据查询时间,对性能有极大提升。 5. 支持活配置dingo-store服务线程个数,用户可以根据实际场景需要调整线程个数 6. 支持服务在运行时指定故障点(failpoint),方便测试Corner case。 7. 支持Sotre & Region 的Metric信息管理 8. 支持算子计算下推,存储层提供基本的operator,DingoClient作为中间端的桥接器,支持SDK和SQL场景,操作类型如下: - SUM - SUM0 - COUNT - MAX - MIN - COUNTWITHNULL 9. 支持自增ID Auto Increment ID,当创建一个具有自增列的表时,DingoDB 自动为插入到表中的每一行分配一个唯一的整数值。通过使用分布式序列生成器确保自增列的值在整个集群中都是唯一的。2.3 SQL协议层
1. 重构Executor端架构,Executor端负责计算,用于解析并响应 Client 端 SQL 请求和其他管理请求 2. 兼容MySQL协议 3. 完成Calcite的升级,提高SQL端的执行效率 4. Metric表级信息采集 5. 网络传输层增加task响应机制(STOP/READY/QUIT)2.4 SQL语法扩展
1. 扩展创建表时指定副本数和分区能力信息,附加相关的附属信息。 2. 扩展通过SQL进行Region分裂,实现数据分布管理,使用更加灵活易用。 3. 扩展MySQL协议相关语法 - 支持查看全局/用户/会话变量 - 支持设置全局/用户/会话变量 - 支持查看表结构/指定列的信息 - 支持查看表/用户创建语句 - 支持设置mysql-driver空闲超时时长 - 支持Sql的预处理2.5 Java SDK层
SDK为开发人员创建的一组软件工具程序,通过特定API接口对数据库进行操作,开发者能够更加灵活且高效的执行数据库操作,降低学习成本,极大提升开发效率。以下是DingoDB SDK层支持的功能特性:
1. 支持通过DingoDB自研API接口执行Connect集群操作 2. 支持表操作(创建/删除) 3. 支持单条数据操作(查看/插入/删除/修改) 4. 支持批量数据操作(查看/插入/删除/修改) 5. 支持范围过滤后的聚合操作 - SUM - SUM0 - COUNT - MAX - MIN - COUNTWITHNULL2.6 DevOPS层
可视化系统监控
- 节点信息监控,帮助用户更有效观察服务器节点状态变化
- 系统进程监控,帮助用户及时发现异常进程,用户及时响应处理
新增系统运维工具
- 支持多节点部署,使用ansible自动化运维工具,通过批量系统配置,程序部署,命令运行等功能来实现批量部署的功能。
新增DBA级别的系统管理工具
- 支持Leader的迁移,将同一group中的Leader切换到领一个follower节点,用于负载均衡或紧急情况下重启机器。
- 支持Region分裂/合并,系统自动将其分裂/合并成多个Region,保证各个Region大小接近,达到负载均衡。
- 支持节点扩缩容,用户可以根据实际场景中数据分布来决定是否增加或减少借点,从而做到负载均衡。
- 可视化Sechma/Table/Region管理,通过可视化工具有效监控Sechma/Table/Region信息。
- v0.5.0Release Notes v0.5.02023-02-10 · 2023-02-10 12:36 UTC
查看更新说明
Release Note - V0.5.0
一、SQL相关特性
- 支持like关键字的模糊查询
- 支持用户认证:用户的增删改查
- 支持用户权限赋予
- 支持集群认证
- 支持SQL批量插入
- 优化Calcite函数校验机制
- 错误码信息重构
二、元数据管理
- 将集群表粒度管理拆分到executor
- 废弃原有Dingo-jraft模块
- Coordinator中将原有Dingo-jraft迁移至Dingo-mpu
- 支持基于SQL的元数据表查询
三、索引相关
- 支持索引的增删改查,提升查询性能
- 支持多种多索引类型:非主键索引和联合索引
四、SDK相关特性
- 支持基于链式表达式的计算,实现多种范围查找后的聚合计算、更新等
- 支持非主键列扫描、过滤计算
- 指标计算特性列表:
序号 函数 说明 1 Scan 扫描表中数据 2 Get 读取表中数据 3 Filter 根据条件过滤数据 4 Add 对列进行数值加操作 5 Put 向表中写入数据 6 Update 修改表中数据 7 Delete 删除表中数据 8 DeleteRange 范围删除表中数据 9 Max 对列与输入求最大值 10 Min 对列与输入求最小值 11 Avg 对列与输入求平均数 12 Sum 对列与输入求和 13 Count 计算记录条数 14 SortList 对输入的数值和已存储的数值按照数值大小进行排序,默认升序 15 DistinctList 对输入的数值和已存储的数值执行去重操作,对重复的数值只纪录一次 16 List 列表,基于输入的数值和已存储的数值,根据条件返回List结果 17 IncreaseCount 递增次数,序列中,存在相邻两点递增,统计相邻递增的次数 18 DecreaseCount 递减次数,序列中,存在相邻两点递减,统计相邻递减的次数 19 maxIncreaseCount 最大递增,序列中,每次连续递增中产生的递增次数的最大值 20 maxDecreaseCount 最大递减,序列中,每次连续递减中产生的递减次数的最大值 五、列存
- 支持基于Merge Tree的列式存储
六、分布式存储
- 解决RocksDB update/delete磁盘释放慢的问题
- 优化Prefix Scan
- 完成RocksDB版本升级
- 优化RocksDB的I/O流程
- 释放DeleteRange执行后的磁盘空间
- RocksDB固定参数可配置
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
DingoDB
DingoDB is an open-source distributed multi-modal vector database independently designed and developed by DataCanvas, which integrates real-time strong consistency, relational semantics, and vector semantics into a unified platform, DingoDB positioning itself as a distinctive multi-modal database solution. With exceptional horizontal scalability and elastic scaling capabilities, it effortlessly meets enterprise-grade high availability requirements. Furthermore, DingoDB offers extensive multi-language interfaces and seamless compatibility with the MySQL protocol, delivering unparalleled flexibility and convenience for users. Demonstrating comprehensive excellence in functionality, performance, and user-friendliness, DingoDB stands out as a robust solution for modern data-driven applications.
Key Features
1. Comprehensive access interface
DingoDB provides comprehensive access interfaces, supporting various flexible access modes such as SQL, SDK, and API to meet the needs of different developers. Additionally, it introduces Table and Vector as first-class citizen data models, providing users with efficient and powerful data processing capabilities.
2.Built-in data high availability
DingoDB provides fully functional and highly available built-in configurations without the need to deploy any external components, which can significantly reduce users' deployment and operation and maintenance costs and significantly improve the efficiency of system operation and maintenance.
3.Fully automatic elastic data sharding
DingoDB supports dynamic configuration of data shard size, automatic splitting and merging, realizing efficient and friendly resource allocation strategies, and easily responding to various business expansion needs.
4.Scalar-vector hybrid retrieval
DingoDB supports both traditional database index types and various vector index types, providing a seamless scalar and vector hybrid retrieval experience, reflecting industry-leading retrieval capabilities. In addition, it also supports fusion of scalars and vectors. Distributed transaction processing.
5.Built-in real-time index optimization
DingoDB can build scalar and vector indexes in real time, providing users with unconscious background automatic index optimization. At the same time, it ensures no delays during data retrieval.
6.Cold-Hot Tiered Retrieval for Massive Datasets DingoDB provides disk-based vector search capabilities to minimize memory consumption, and supports dynamic switching between different indexes based on data scale requirements.
Get Start
Docs
All Documentation Docs
Install
How to install and deploy Docker or Ansible
Usage
How to use DingoDB Usage
Developing DingoDB
VS Code
We recommend VS Code to develop the DingoDB codebase.
Java Profiler tools: YourKit
We recommend YourKit Java Profiler for any preformance critical application you make.
Check it out at https://www.yourkit.com/
Projects about DingoDB
The main projects about DingoDB are as follows:
- Dingo-Store: A strongly consistent distributed storage system based on the Raft protocol.
- Dingo-Deploy: The deployment project of compute nodes and storage nodes.
How to make a clean pull request
- Create a personal fork of dingo on GitHub.
- Clone the fork on your local machine. Your remote repo on GitHub is called origin.
- Add the original repository as a remote called upstream.
- If you created your fork a while ago be sure to pull upstream changes into your local repository.
- Create a new branch to work on. Branch from develop.
- Implement/fix your feature, comment your code.
- Follow the code style of Google code style, including indentation.
- If the project has tests run them!
- Add unit tests that test your new code.
- In general, avoid changing existing tests, as they also make sure the existing public API is unchanged.
- Add or change the documentation as needed.
- Squash your commits into a single commit with git's interactive rebase.
- Push your branch to your fork on GitHub, the remote origin.
- From your fork open a pull request in the correct branch. Target the Dingo's develop branch.
- Once the pull request is approved and merged you can pull the changes from upstream to your local repo and delete your branch.
- Last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.
Special Thanks
DataCanvas
DingoDB is Sponsored by DataCanvas, a new platform to do data science and data process in real-time.
DingoDB is an open-source project licensed under the Apache License Version 2.0, welcome any feedback from the community. For any support or suggestion, please contact us.
Contact us
If you have any technical questions or business needs, please contact us.
Attach the Wetchat QR Code
