matrixone

matrixoriginApache-2.0活跃维护

AI 原生 HTAP 数据库,内置向量检索和 Git-for-Data 数据版本管理,可作为智能体与 AI 应用的数据和记忆底座。

AI-native HTAP database with Git-for-Data and built-in vector search, serving as the data and memory backbone for intelligent agents and applications.

v4.1.6-hotfix-20261107发布于 2026-11-07 05:20 UTC2,063star343fork同步于 2026-11-10 05:45 UTC

怎么上手

由 README 提炼,执行前请确认
docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:latest
mysql -h127.0.0.1 -P6001 -p111 -uroot -e "create database demo"
硬件要求按 README 说明

README 未说明显存或 GPU 要求;平台标注支持 MacOS 与 Linux,源码构建需 Go 1.27.1 及以上、GCC/Clang、Git 和 Make。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 Git 式版本控制引入数据的 MySQL 兼容 HTAP 数据库,一个库同时扛事务、分析、全文与向量检索

AI 原生 HTAP 数据库,内置向量检索和 Git-for-Data 数据版本管理,可作为智能体与 AI 应用的数据和记忆底座。

核心能力

  • 用零拷贝快照、时间旅行、分支合并管理数据版本
  • 内置 IVF/HNSW 向量索引与全文检索,免外部向量库
  • 兼容 MySQL 协议,现有工具与 ORM 可直接接入
  • HSTAP 引擎统一 OLTP、OLAP、搜索,无需 ETL 搬数据
  • 提供 Python SDK,支持异步调用与快照、PITR 管理

容易踩的坑

默认 root 密码为 111、端口 6001,直接暴露需自行改配置;Python 示例依赖额外安装 matrixone-python-sdk;源码构建要求 Go 1.27.1 以上,版本过低会编译失败。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v4.1.6-hotfix-20261107
  1. v4.1.6-hotfix-20261107最新正式版2026-11-07 · 2026-11-07 05:20 UTC

    Release date: November 7, 2026 MatrixOne version: v4.1.6-hotfix-20261107

    Maintenance release from branch 4.1.6-hotfix at commit ef9256eca2c6436619272927e97f629af41ebd55.

    Improvements

    • Pipeline bounded CSV uploads and reduce array-field parsing allocations while retaining memory-admission and cleanup bounds. #31810

    Bug Fixes

    • Stabilize Top typed-NULL column layout to prevent index-out-of-range panics; clear stale vector references on empty payloads and preserve repeated-key ordering semantics. #32239
    • Preserve CTAS output nullability for UNION and outer joins, retain appropriate CASE/IF and IFNULL/COALESCE constraints, and correct RANDOM_BYTES volatility and NULL-output handling. #32085

    Known Limitations

    • Correct nullable UNION metadata can select the slower loop MARK path for NULL-aware NOT IN queries. Performance and memory mitigation are tracked separately in #32263 and #32315 and are not included in this release.
    • Shared UNION type reconciliation remains tracked in #32326; this release does not claim full SELECT/CTAS type equivalence with MySQL.

    What Changed

    • #31810: perf(import): pipeline bounded uploads and reduce CSV parsing allocations
    • #32239: fix: stabilize Top typed-NULL layout on 4.1.6-hotfix
    • #32085: fix(plan): preserve CTAS output nullability on 4.1.6 hotfix

    Release artifacts and Linux amd64/arm64 images are built asynchronously after publication. The expected image tag is 4.1.6-hotfix-20261107; this maintenance release does not update the latest image alias.

    Full Changelog: https://github.com/matrixorigin/matrixone/compare/v4.1.6-hotfix-20261029...v4.1.6-hotfix-20261107

  2. v4.2.8MatrixOne-v4.2.82026-11-04 · 2026-11-04 08:31 UTC
    查看更新说明

    Release date: November 4, 2026
    MatrixOne version: v4.2.8

    MatrixOne 4.2.8 is a patch release on the 4.2 line, adding query-level IVF search tuning and fixing concurrent writes, DELETE planning, transaction-local scan visibility, role grants, and FileService HTTP tracing.

    Key Improvements

    Vector Search

    • Query-Level IVF nprobe: Override the session probe setting for individual IVFFLAT and IVFPQ queries. Defaults are unchanged; increasing nprobe can increase search cost. Invalid or unknown rank options now return errors rather than being ignored.

    Key Bug Fixes

    SQL and Transaction Correctness

    • Concurrent ODKU Writes: Lock the actual row resolved through a secondary UNIQUE key, while retaining incoming-primary-key locking for new rows, to prevent conflicting writes from producing duplicate rows or inconsistent indexes.
    • DELETE Target Scope: Validate targets against their original FROM sources and keep joined deletes on row-based execution instead of incorrectly treating them as unrestricted deletes.
    • Transaction-Local Reads: Keep uncommitted persisted objects on the initiating CN during distributed scans, and preserve execution constraints when applying execType hints.
    • Auto-Increment Inserts: Check actual key conflicts instead of repeatedly retrying solely because more than 64 objects changed within the cached allocation window.

    Reliability and Access Control

    • Concurrent Role Grants: Serialize role-graph changes and refresh validation visibility so competing grants cannot commit a role-inheritance cycle.
    • FileService HTTP Tracing: Give each HTTP request its own trace lifetime and synchronize callback timing state, avoiding pooled-trace reset races.

    Upgrade Notes

    • The ODKU fix prevents the affected write path from introducing new inconsistencies; already-corrupt tables still require separate assessment and repair. Upgrade all SQL-serving CNs before relying on the corrected behavior.
    • IVF search remains approximate. In 4.2 AUTO mode, an empty result triggers PRE fallback, but a nonempty short page does not. Query-level nprobe does not guarantee complete recall or a full result page.

    What's Changed

    Full Changelog: https://github.com/matrixorigin/matrixone/compare/v4.2.7...v4.2.8

  3. v4.2.1-hotfix-20261103MatrixOne-v4.2.1-hotfix-202611032026-11-03 · 2026-11-03 06:44 UTC
    查看更新说明

    Release date: November 3, 2026
    MatrixOne version: v4.2.1-hotfix-20261103

    This hotfix builds on v4.2.1-hotfix-20261030, adding only #32035, which backports #27777 and #28945. Release commit: 87866e6d2822a69c0a48d4ddec990a452fd99b33. All earlier fixes in this customer hotfix line are retained.

    Key Bug Fixes

    ETL merge reliability

    • Skip directory markers and unsupported entries during ETL merge. Unsupported reader paths now return an error instead of terminating the CN with a NOT Implements panic.

    Multi-CN IVF search correctness

    • Rank distributed IVF candidates by distance before applying the global candidate limit, preserving better candidates arriving from later streams.

    Validation and deployment notes

    The release commit has the same source tree as the reviewed #32035 head. Targeted normal/race tests and planner controls have recorded passing results; the PR author also reports two successful runs of the existing multi-CN IVF BVT (26/26 statements each). This is not a complete green kernel-regression certification. The review records pre-existing Parquet test failures reproduced on the base; Iceberg CI failed while pulling MinIO images. Release builds and binary regression results are tracked separately.

    Global IVF ranking adds candidate-processing and sorting work. The source PR reported about 27% higher median latency on one historical million-row fixture; this benchmark was not rerun for this release and is not a prediction for all workloads.

    The two newly added fixes affect CN execution. The inherited backup fixes from 20261030 still require both CN and TN to be upgraded for their complete effect; a CN-only upgrade does not provide the full backup fix or repair already-missing source files.

    This hotfix does not update latest. Use the explicit version tag or a verified image digest, and verify the corresponding image build before deployment.

    What's Changed

    Full Changelog: https://github.com/matrixorigin/matrixone/compare/v4.2.1-hotfix-20261030...v4.2.1-hotfix-20261103

  4. v4.2.7MatrixOne-v4.2.72026-11-01 · 2026-11-01 04:05 UTC
    查看更新说明

    Release date: November 1, 2026
    MatrixOne version: v4.2.7

    MatrixOne 4.2.7 is a patch release on the 4.2 line, improving window-query performance and composite-index planning, with fixes for memory ownership, backup history, query cancellation, SQL file-access isolation, and vector CPU dispatch.

    Upgrade Notes

    • Server File Access: Local files and configured server file services now require the current sys/moadmin identity. Existing asynchronous indexes using local Datalink sources need remote sources or authorized materialization into TEXT followed by rebuilding. Upgrade all SQL-serving CNs before relying on this boundary; see the file-access policy.
    • Floating-Point Index Predicates: FLOAT/DOUBLE predicates are excluded from serialized regular-index access for correctness. Queries that relied on that access may scan more rows and incur higher I/O or latency.
    • Legacy DECIMAL256 Indexes: When upgrading from affected older versions, retain the index-rebuild and mixed-writer precautions introduced in 4.2.6; see the upgrade procedure.

    Key Improvements

    Query Execution and Planning

    • Window Aggregation: Reuse full-partition and supported cumulative aggregate states instead of repeatedly evaluating the same frame.
    • Composite Indexes: Restore eligible secondary-index access and preserve exact residual predicates and prefix-index semantics.

    Key Bug Fixes

    Reliability and Correctness

    • Memory Ownership: Reclaim materialized CTE reader batches and repair vector ownership on clone and transaction-error paths.
    • Backup and Restore: Preserve table-ID history and its index objects across physical backup and restore. Previously incomplete archives are not retroactively repaired.
    • Query Cancellation: Observe cancellation in LoopJoin and LIKE evaluation, and refresh reused request contexts correctly.
    • File-Access Isolation: Prevent SQL table privileges from granting access to CN files or server file services.
    • Vector CPU Dispatch: Keep AVX-512 instructions behind runtime CPU guards, including debug builds on supported AVX2-only CPUs.

    What's Changed

    Selected changes; the full comparison is linked below.

    Full Changelog: https://github.com/matrixorigin/matrixone/compare/v4.2.6...v4.2.7

  5. v4.2.1-hotfix-20261030MatrixOne-v4.2.1-hotfix-202610302026-10-30 · 2026-10-30 10:35 UTC
    查看更新说明

    Release date: October 30, 2026
    MatrixOne version: v4.2.1-hotfix-20261030

    This hotfix is based directly on v4.2.1-hotfix-20261029 (3391c6844e95d1bb27a647b18f48f7c3a5ba1695), adding only #31886, which backports the backup fixes from #29504 and #30744. Release commit: e0e2308d074d84c507ce15352ffb0ea0405ab3b8. All earlier fixes in this customer hotfix line are retained.

    Key Improvements

    Backup and restore history

    • Preserve predecessor checkpoint table-ID indexes in new backup archives, with checksum verification, so restored databases retain the history needed by snapshot/PITR retention and subsequent checkpoints.

    Key Bug Fixes

    Backup selection and checkpoint boundaries

    • Resolve object lifecycles before deduplication and require persisted, covering GC scan evidence before omitting collected objects. Keep live and retained historical references; legacy GC metadata without reliable coverage remains conservative.
    • Correct the global/incremental checkpoint backup boundary and propagate metadata-read failures in the updated collection paths instead of continuing with partial results.

    Validation and deployment scope

    Targeted package tests, race tests, repeated restore checks, and an independent fresh-WAL restore test passed on the reviewed PR head. The release commit has the identical source tree. GitHub MongoDB E2E passed, but no complete kernel-regression run was recorded on the final merge SHA. This release proceeds with that test status explicitly accepted; release builds and binary regression results are tracked separately. Production-scale backup/restore and external backup-tool integration were not validated in this review.

    Upgrade CN and TN together to apply the complete fix. TN supplies GC scan evidence and the corrected checkpoint boundary; a CN-only upgrade is not sufficient. Validate backups after both components are upgraded, rather than relying on backups during a mixed-version transition.

    This release does not recover source files that are already missing, retroactively certify old GC scans, or repair previously incomplete backup archives. Missing files without trustworthy GC coverage can still fail backup; a new GC cycle does not necessarily prove coverage of an older object lifecycle.

    This hotfix does not update latest. Use the explicit version tag or a verified image digest, and verify the corresponding image build before deployment.

    What's Changed

    Full Changelog: https://github.com/matrixorigin/matrixone/compare/v4.2.1-hotfix-20261029...v4.2.1-hotfix-20261030

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Contents

    What is MatrixOne?

    MatrixOne is the industry's first database to bring Git-style version control to data, combined with MySQL compatibility, AI-native capabilities, and cloud-native architecture.

    At its core, MatrixOne is a HTAP (Hybrid Transactional/Analytical Processing) database with a hyper-converged HSTAP engine that seamlessly handles transactional (OLTP), analytical (OLAP), full-text search, and vector search workloads in a single unified system—no data movement, no ETL, no compromises.

    🎬 Git for Data - The Game Changer

    Just as Git revolutionized code management, MatrixOne brings Git-style workflows to data management. The design behind this capability is detailed in the arXiv paper Version Control System for Data with MatrixOne, and in practice it lets you manage your database like code:

    • 📸 Instant Snapshots - Zero-copy snapshots in milliseconds, no storage explosion
    • ⏰ Time Travel - Query data as it existed at any point in history
    • 🔀 Branch & Merge - Test migrations and transformations in isolated branches
    • ↩️ Instant Rollback - Restore to any previous state without full backups
    • 🔍 Complete Audit Trail - Track every data change with immutable history

    Why it matters: Data mistakes are expensive. Git for Data gives you the safety net and flexibility developers have enjoyed with Git—now for your most critical asset: your data.


    🎯 Built for the AI Era

    🗄️ MySQL-Compatible

    Drop-in replacement for MySQL. Use existing tools, ORMs, and applications without code changes. Seamless migration path.

    🤖 AI-Native

    Built-in vector search (IVF/HNSW) and full-text search. Build RAG apps and semantic search directly—no external vector databases needed.

    ☁️ Cloud-Native

    Storage-compute separation. Deploy anywhere. Elastic scaling. Kubernetes-native. Zero-downtime operations.


    🚀 One Database for Everything

    The typical modern data stack:

    🗄️ MySQL for transactions → 📊 ClickHouse for analytics → 🔍 Elasticsearch for search → 🤖 Pinecone for AI

    The problem: 4 databases · Multiple ETL jobs · Hours of data lag · Sync nightmares

    MatrixOne replaces all of them:

    🎯 One database with native OLTP, OLAP, full-text search, and vector search. Real-time. ACID compliant. No ETL.

    ⚡️ Get Started in 60 Seconds

    1️⃣ Launch MatrixOne

    docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:latest
    

    2️⃣ Create Database

    mysql -h127.0.0.1 -P6001 -p111 -uroot -e "create database demo"
    

    3️⃣ Connect & Query

    Install Python SDK:

    pip install matrixone-python-sdk
    

    Vector search:

    from matrixone import Client
    from matrixone.orm import declarative_base
    from sqlalchemy import Column, Integer, String, Text
    from matrixone.sqlalchemy_ext import create_vector_column
    
    # Create client and connect
    client = Client()
    client.connect(database='demo')
    
    # Define model using MatrixOne ORM
    Base = declarative_base()
    
    class Article(Base):
        __tablename__ = 'articles'
        id = Column(Integer, primary_key=True, autoincrement=True)
        title = Column(String(200), nullable=False)
        content = Column(Text, nullable=False)
        embedding = create_vector_column(8, "f32")
    
    # Create table using client API
    client.create_table(Article)
    
    # Insert some data using client API
    articles = [
        {'title': 'Machine Learning Guide',
         'content': 'Comprehensive machine learning tutorial...',
         'embedding': [0.1, 0.2, 0.3, 0.15, 0.25, 0.35, 0.12, 0.22]},
        {'title': 'Python Programming',
         'content': 'Learn Python programming basics',
         'embedding': [0.2, 0.3, 0.4, 0.25, 0.35, 0.45, 0.22, 0.32]},
    ]
    client.batch_insert(Article, articles)
    
    client.vector_ops.create_ivf(
        Article,
        name='idx_embedding',
        column='embedding',
        lists=100,
        op_type='vector_l2_ops'
    )
    
    query_vector = [0.2, 0.3, 0.4, 0.25, 0.35, 0.45, 0.22, 0.32]
    results = client.query(
        Article.title,
        Article.content,
        Article.embedding.l2_distance(query_vector).label("distance"),
    ).filter(Article.embedding.l2_distance(query_vector) < 0.1).execute()
    for row in results.rows:
        print(f"Title: {row[0]}, Content: {row[1][:50]}...")
    
    # Cleanup
    client.drop_table(Article)  # Use client API
    client.disconnect()
    

    Fulltext Search:

    ...
    from matrixone.sqlalchemy_ext import boolean_match
    
    # Create fulltext index using SDK
    client.fulltext_index.create(
        Article,name='ftidx_content',columns=['title', 'content']
    )
    
    # Boolean search with must/should operators
    results = client.query(
        Article.title,
        Article.content,
        boolean_match('title', 'content')
            .must('machine')
            .must('learning')
            .must_not('basics')
    ).execute()
    
    # Results is a ResultSet object
    for row in results.rows:
        print(f"Title: {row[0]}, Content: {row[1][:50]}...")
    ...
    

    That's it! 🎉 You're now running a production-ready database with Git-like snapshots, vector search, and full ACID compliance.

    💡 Want more control? Check out the Installation & Deployment section below for production-grade installation options.

    📖 Python SDK Documentation →

    📚 Tutorials & Demos

    Ready to dive deeper? Explore our comprehensive collection of hands-on tutorials and real-world demos:

    🎯 Getting Started Tutorials

    TutorialLanguage/FrameworkDescription
    Java CRUD DemoJavaJava application development
    Spark JDBC writesPython / SparkConfigure Spark JDBC writes for MatrixOne's supported isolation level
    SpringBoot and JPA CRUD DemoJavaSpringBoot with Hibernate/JPA
    PyMySQL CRUD DemoPythonBasic database operations with Python
    SQLAlchemy CRUD DemoPythonPython with SQLAlchemy ORM
    Django CRUD DemoPythonDjango web framework
    Golang CRUD DemoGoGo application development
    Gorm CRUD DemoGoGo with Gorm ORM
    C# CRUD DemoC#.NET application development
    TypeScript CRUD DemoTypeScriptTypeScript application development

    🚀 Advanced Features Tutorials

    TutorialUse CaseRelated MatrixOne Features
    Pinecone-Compatible Vector SearchAI & Searchvector search, Pinecone-compatible API
    IVF Index Health MonitoringAI & Searchvector search, IVF index
    HNSW Vector IndexAI & Searchvector search, HNSW index
    Fulltext Natural SearchAI & Searchfulltext search, natural language
    Fulltext Boolean SearchAI & Searchfulltext search, boolean operators
    Fulltext JSON SearchAI & Searchfulltext search, JSON data
    Hybrid SearchAI & Searchhybrid search, vector + fulltext + SQL
    RAG Application DemoAI & SearchRAG, vector search, fulltext search
    Picture(Text)-to-Picture SearchAI & Searchmultimodal search, image similarity
    Dify Integration DemoAI & SearchAI platform integration
    HTAP Application DemoPerformanceHTAP, real-time analytics
    Instant Clone for Multi-Team DevelopmentPerformanceinstant clone, Git for Data
    Safe Production Upgrade with Instant RollbackPerformancesnapshot, rollback, Git for Data

    📖 View All Tutorials →

    🛠️ Installation & Deployment

    MatrixOne supports multiple installation methods. Choose the one that best fits your needs:

    🐳 Local Multi-CN Development

    Run a complete distributed cluster locally with multiple CN nodes, load balancing, and easy configuration management.

    # Quick start
    make dev-build && make dev-up
    
    # Connect via proxy (load balanced)
    mysql -h 127.0.0.1 -P 6001 -u root -p111
    
    # Configure specific service (interactive editor)
    make dev-edit-cn1          # Edit CN1 config
    make dev-restart-cn1       # Restart only CN1 (fast!)
    

    📖 Complete Development Guide → - Comprehensive guide covering standalone setup, multi-CN clusters, monitoring, metrics, configuration, and all make dev-* commands

    🎯 Using mo_ctl Tool (Recommended for Production)

    One-command deployment and lifecycle management with the official mo_ctl tool. Handles installation, upgrades, backups, and health monitoring automatically.

    📖 Complete mo_ctl Installation Guide →

    ⚙️ Building from Source

    Build MatrixOne from source for development, customization, or contributing. Requires Go 1.27.1 or later, GCC/Clang, Git, and Make.

    📖 Complete Build from Source Guide →

    🐳 Other Methods

    Docker standalone, Kubernetes, binary packages, and more deployment options.

    📖 All Installation Options →

    🔎 Architecture

    MatrixOne's architecture is as below:

    For more details, you can checkout MatrixOne Architecture Design.

    🐍 Python SDK

    MatrixOne provides a comprehensive Python SDK for database operations, vector search, fulltext search, and advanced features like snapshots, PITR, and account management.

    Key Features: High-performance async/await support, vector similarity search with IVF/HNSW indexing, fulltext search, metadata analysis, and complete type safety.

    📚 Complete Documentation Documentation Status

    📖 Python SDK README - Full features, installation, and usage guide

    📦 Installation: pip install matrixone-python-sdk

    Citing MatrixOne

    If you use MatrixOne in academic work or refer to its Git for Data design, please cite:

    @misc{gou2026versioncontrolsystemdata,
      title={Version Control System for Data with MatrixOne},
      author={Gou, Hongshen and Tian, Feng and Wang, Long and Deng, Nan and Xu, Peng},
      year={2026},
      eprint={2604.03927},
      archivePrefix={arXiv},
      primaryClass={cs.DB},
      doi={10.48550/arXiv.2604.03927},
      url={https://arxiv.org/abs/2604.03927}
    }
    

    🙌 Contributing

    Contributions to MatrixOne are welcome from everyone. See Contribution Guide for details on submitting patches and the contribution workflow.

    👏 All contributors

    License

    MatrixOne is licensed under the Apache License, Version 2.0.