Skip to content

Conversation

@sixpluszero
Copy link
Contributor

Problem Statement

Currently, the RocksDB BlobDB feature can only be configured at the cluster level via RocksDBServerConfig.isBlobFilesEnabled(). This means all stores on a host must use the same BlobDB setting, which limits flexibility when different stores have different requirements for large value storage optimization.

There is no way to:

  • Enable BlobDB for specific stores that would benefit from it (stores with large values)
  • Disable BlobDB for specific stores where it might cause performance issues
  • Override the cluster-level default on a per-store basis

Solution

This PR adds store-level (version-level) BlobDB configuration that allows fine-grained control over BlobDB enablement per store, with automatic fallback to cluster-level configuration when not specified.

Configuration Hierarchy

  1. Version-level config takes precedence when set to ENABLED or DISABLED
  2. Cluster-level config is used as fallback when version-level is NOT_SPECIFIED

Implementation Details

  • Added blobDbEnabled field to Version and Store interfaces using ActivationState enum (NOT_SPECIFIED, ENABLED, DISABLED)
  • Updated StoragePartitionConfig to carry the BlobDB setting from version config
  • Modified RocksDBStoragePartition.getStoreOptions() to check store-level config with fallback to cluster-level
  • Added controller support to accept and persist the BlobDB config via UpdateStoreQueryParams
  • Added admin-tool CLI argument --blob-db-enabled for the update-store command
  • Updated Avro schemas: StoreMetaValue v40 and AdminOperation v95

Code changes

  • Added new code behind a config. Config name: blob_db_enabled with default value NOT_SPECIFIED (falls back to cluster-level config).
  • Introduced new log lines.
    • Confirmed if logs need to be rate limited to avoid excessive logging.

Concurrency-Specific Checks

Both reviewer and PR author to verify

  • Code has no race conditions or thread safety issues. (The blobDbEnabled field follows the same pattern as other store config fields)
  • Proper synchronization mechanisms (e.g., synchronized, RWLock) are used where needed. (N/A - no new synchronization needed)
  • No blocking calls inside critical sections that could lead to deadlocks or performance degradation.
  • Verified thread-safe collections are used (e.g., ConcurrentHashMap, CopyOnWriteArrayList). (N/A - no new collections)
  • Validated proper exception handling in multi-threaded code to avoid silent thread termination.

How was this PR tested?

  • New unit tests added.
    • TestStoreInfo.testBlobDbEnabledConfig() - Tests getter/setter for BlobDB enabled flag
    • RocksDBStoragePartitionTest.testStoreLevelBlobDbConfigOverridesClusterLevel() - Tests all three scenarios (ENABLED, DISABLED, NOT_SPECIFIED with fallback)
  • New integration tests added.
  • Modified or extended existing tests.
    • ReadOnlyStoreTest.testCloneStoreProperties() - Added verification for blobDbEnabled field cloning
  • Verified backward compatibility (if applicable). Default value NOT_SPECIFIED preserves existing behavior by falling back to cluster-level config.

Does this PR introduce any user-facing or breaking changes?

  • No. You can skip the rest of this section.

The default value NOT_SPECIFIED ensures existing stores continue to use the cluster-level BlobDB configuration, maintaining backward compatibility. Users can opt-in to store-level control via the new admin-tool argument.


Files Changed (22 files)

Core Implementation

  • internal/venice-common/src/main/java/com/linkedin/venice/meta/Version.java - Added interface methods
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/VersionImpl.java - Implemented getter/setter
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/Store.java - Added interface methods
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/ZKStore.java - Implemented getter/setter
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/AbstractStore.java - Added to setupNewVersionWithStoreLevelConfig
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/ReadOnlyStore.java - Added delegation
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/SystemStore.java - Added delegation
  • internal/venice-common/src/main/java/com/linkedin/venice/meta/StoreInfo.java - Added field and getter/setter

Storage Layer

  • clients/da-vinci-client/src/main/java/com/linkedin/davinci/config/StoragePartitionConfig.java - Added blobDbEnabled field
  • clients/da-vinci-client/src/main/java/com/linkedin/davinci/store/rocksdb/RocksDBStoragePartition.java - Updated getStoreOptions() with fallback logic
  • clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/StoreIngestionTask.java - Set blobDbEnabled from version config

Controller

  • internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/ControllerApiConstants.java - Added constant
  • internal/venice-common/src/main/java/com/linkedin/venice/controllerapi/UpdateStoreQueryParams.java - Added getter/setter
  • services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java - Added parameter handling
  • services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceParentHelixAdmin.java - Added UpdateStore handling
  • services/venice-controller/src/main/java/com/linkedin/venice/controller/kafka/consumer/AdminExecutionTask.java - Added message deserialization

Admin Tool

  • clients/venice-admin-tool/src/main/java/com/linkedin/venice/Arg.java - Added CLI argument
  • clients/venice-admin-tool/src/main/java/com/linkedin/venice/AdminTool.java - Added parameter parsing

Schema & Build

  • build.gradle - Updated to use StoreMetaValue v40 and AdminOperation v95

Tests

  • internal/venice-common/src/test/java/com/linkedin/venice/meta/TestStoreInfo.java - Added testBlobDbEnabledConfig
  • internal/venice-common/src/test/java/com/linkedin/venice/meta/ReadOnlyStoreTest.java - Added blobDbEnabled verification
  • clients/da-vinci-client/src/test/java/com/linkedin/davinci/store/rocksdb/RocksDBStoragePartitionTest.java - Added comprehensive test

@sixpluszero sixpluszero changed the title [server][controller][admin-tool][da-vinci] Add store-level BlobDB configuration with cluster-level fallback [compat][server][controller][admin-tool][da-vinci] Add store-level BlobDB configuration with cluster-level fallback Feb 3, 2026
@sixpluszero sixpluszero changed the title [compat][server][controller][admin-tool][da-vinci] Add store-level BlobDB configuration with cluster-level fallback [compat][server][controller][admin-tool] Add store-level BlobDB configuration with cluster-level fallback Feb 3, 2026
@sixpluszero sixpluszero force-pushed the feature/store-level-blob-db-config branch from 374e404 to af2bc34 Compare February 7, 2026 01:25
…in-tool

support

- Add blobDbEnabled field to Version interface and implementations
- Add blobDbEnabled field to Store interface and implementations (ZKStore,
AbstractStore, ReadOnlyStore, SystemStore)
- Add blobDbEnabled to StoragePartitionConfig using ActivationState enum
- Update RocksDBStoragePartition.getStoreOptions() to check store-level
config with fallback to cluster-level
- Update StoreIngestionTask.getStoragePartitionConfig() to set blobDbEnabled
from version config
- Add BLOB_DB_ENABLED constant to ControllerApiConstants
- Add getter/setter to UpdateStoreQueryParams
- Add BLOB_DB_ENABLED CLI argument to Arg.java and AdminTool.java
- Add handling in VeniceHelixAdmin and VeniceParentHelixAdmin
- Add handling in AdminExecutionTask for message deserialization
- Add blobDbEnabled field to StoreInfo
- Update build.gradle to use StoreMetaValue v40 and AdminOperation v95
- Add tests for TestStoreInfo, RocksDBStoragePartitionTest, and
ReadOnlyStoreTest

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@sixpluszero sixpluszero force-pushed the feature/store-level-blob-db-config branch from af2bc34 to 6481b29 Compare February 7, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant