Skip to content

Conversation

@zamaoxiaoji
Copy link

What problem does this PR solve?

This PR adds support for OceanBase as the primary database in RAGFlow, allowing users to leverage OceanBase's high availability and scalability features.

Background:

RAGFlow currently supports MySQL and PostgreSQL as primary databases
OceanBase is a distributed relational database with MySQL compatibility mode
This feature is part of the RAGFlow + OceanBase Hackathon initiative
Key Changes:

Created RetryingPooledOceanBaseDatabase class inheriting from Peewee's MySQL database class
Added OceanBase to PooledDatabase, DatabaseMigrator, TextFieldType, and DatabaseLock enums
Implemented OceanBaseDatabaseLock for distributed locking support
Updated configuration templates for OceanBase connection settings
Added CI tests for OceanBase database scenarios
Usage:
Users can switch to OceanBase by setting the environment variable:

DB_TYPE=oceanbase
Related Files:

api/db/db_models.py - Database model definitions and connection classes
docker/.env - Environment variable configuration
docker/service_conf.yaml.template - Service configuration template
Technical Specification:
See docs/oceanbase-primary-db-technical-spec.md for detailed implementation plan.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • [√] New Feature (non-breaking change which adds functionality)
  • [√] Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. 💞 feature Feature request, pull request that fullfill a new feature. 📖 documentation Improvements or additions to documentation labels Jan 26, 2026
@zamaoxiaoji zamaoxiaoji marked this pull request as draft January 26, 2026 08:48
@yuzhichang
Copy link
Member

Replaced by #12926

@yuzhichang yuzhichang closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation 💞 feature Feature request, pull request that fullfill a new feature. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants