feat(config): remove ineffective RocksDB table setters
What does this PR do?
Remove RocksDB block-table setters that were applied after setTableFormatConfig() and therefore never reached the native table factory.
Keep the existing storage.dbSettings.blocksize entries and Java API for compatibility, while documenting in reference.conf that the value is not currently applied to native RocksDB table options.
Add regression tests for the shipped Options-level configuration and the effective native block-table behavior.
Why are these changes required?
setTableFormatConfig() materializes the native table factory from the Java configuration at call time. The later block-size, shared-cache, index/filter-cache, L0-pinning, and Bloom-filter setters only changed the Java object and did not affect the native factory.
Moving those setters before setTableFormatConfig() would activate several unverified settings at once. In a fixed 500-block Mainnet replay, activating the combined settings reduced throughput from 2.421 blocks/s to 1.969 and 1.680 blocks/s, while restoring the pre-change effective native behavior produced 2.418 blocks/s.
This change therefore removes the ineffective setter sequence while preserving the behavior that nodes actually used before the change.
This PR has been tested by:
./gradlew :common:test --tests org.tron.common.setting.RocksDbSettingsTest./gradlew :framework:test --tests org.tron.core.config.ConfigurationTest./gradlew :framework:checkstyleMain./gradlew :framework:checkstyleTest
Follow up
Evaluate block size, Bloom filters, shared-cache capacity, ownership, lifecycle, and observability independently with representative SR and database-specific workloads before enabling another RocksDB table profile.
Extra details
blocksizeremains configurable and observable for compatibility but is not applied to the native table factory.- The existing static shared-cache object and accessor remain for separate configuration design and validation.
- No API, protocol, database-format, or migration changes are introduced.
Closes #49
Summary by cubic
Uses RocksDB's native block-table defaults and keeps storage.dbSettings.blocksize only for compatibility. Old behavior set block size, bloom filter, and cached index/filter blocks; new behavior sets no table options (defaults: 4 KB blocks, no bloom, index/filter not cached). No API, protocol, or DB-format changes.
Refactors
- Remove table-option setters that never reached the native table factory.
- Document in
reference.confthatblocksizeis not applied to table options. - Add tests to verify native table defaults and preserve effective non-table RocksDB settings.
- Keep the shared LRU cache for future configuration.
Closes #6939