The GitHub Actions job "CI" on kvrocks.git/unstable has failed. Run started by GitHub user hanxi (triggered by git-hulk).
Head commit for run: c55b0dc0bf55b367098c84d50efa58fc754d845f / 涵曦 <[email protected]> feat: add redis-databases option to support SELECT command Background ---------- This commit introduces Redis-compatible multi-database support to Kvrocks through a new redis-databases configuration option. When enabled, users can use the SELECT command to switch between different logical databases, providing better Redis compatibility for applications that rely on this feature. Changes ------- Configuration: - Add redis-databases config option in kvrocks.conf (default: 0, range: 0-16) * When set to 0: operates in namespace mode (original behavior) * When set to 1-16: operates in database mode (Redis-compatible) Command Implementation: - SELECT command: Switch between databases (0 to redis-databases-1) * Returns error when DB index is out of range in database mode * Always returns OK in namespace mode for backward compatibility - NAMESPACE commands: Disabled when redis-databases > 0 * All NAMESPACE operations (ADD/SET/DEL/GET/CURRENT) return error * Ensures mutual exclusivity between namespace and database modes - CLIENT INFO: Display format adapts to current mode * Database mode: shows db=N field * Namespace mode: shows namespace=X field - AUTH/HELLO: Work seamlessly with database switching * Authentication state persists across database switches * HELLO command supports AUTH parameter in database mode Testing: - Comprehensive test suite in tests/gocase/unit/select/select_test.go: * Basic SELECT command functionality * Data isolation between databases * NAMESPACE command blocking in database mode * CLIENT INFO field verification * AUTH/HELLO integration with SELECT * Edge cases and error handling Compatibility Notes ------------------- - Backward compatible: Default behavior (redis-databases=0) unchanged - Migration path: Existing namespace-based deployments unaffected - Limitation: Cannot use both namespace and database features simultaneously Example Usage ------------- Enable database mode with 16 databases: redis-databases 16 Client usage: SELECT 0 SET key1 value1 SELECT 1 SET key1 value2 # Different value in DB 1 SELECT 0 GET key1 # Returns value1 Closes: #3291 Report URL: https://github.com/apache/kvrocks/actions/runs/20255059726 With regards, GitHub Actions via GitBox
