fix(config): remove ineffective RocksDB table setters - #6944
Open
bladehan1 wants to merge 1 commit into
Open
Conversation
halibobo1205
reviewed
Sep 2, 2026
| RocksDB.loadLibrary(); | ||
| } | ||
|
|
||
| private static final LRUCache cache = new LRUCache(1 * 1024 * 1024 * 1024L); |
Collaborator
There was a problem hiding this comment.
[SHOULD] cache is unused now, remove it ?
Collaborator
Author
There was a problem hiding this comment.
The existing static shared-cache object and accessor remain for separate configuration design and validation.
This won't actually use 1GB of memory; it only incurs a small object overhead.
halibobo1205
reviewed
Sep 2, 2026
| tableCfg.setCacheIndexAndFilterBlocks(true); | ||
| tableCfg.setPinL0FilterAndIndexBlocksInCache(true); | ||
| tableCfg.setFilter(new BloomFilter(10, false)); | ||
| options.setTableFormatConfig(new BlockBasedTableConfig()); |
Collaborator
There was a problem hiding this comment.
[NIT] Remove options.setTableFormatConfig(new BlockBasedTableConfig()); ?
Collaborator
Author
There was a problem hiding this comment.
Retain an entry point for modifying the configuration; this is a change that will require separate verification in the future.
Preserve the shipped RocksDB configuration and public block-size API while removing table setters that never reached the native table factory. Document that blocksize is currently ineffective and verify native behavior. Keep the existing shared cache object for separate configuration design and validation. Closes tronprotocol#6939
bladehan1
force-pushed
the
feature/remove_unverified_rocksdb_config
branch
from
September 2, 2026 07:48
14922c4 to
7f628d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.blocksizeentries and Java API for compatibility, while documenting inreference.confthat 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:checkstyleTestFollow 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.Closes #6939