Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the rocksdb cache optional in config and add policy for column opening #2526

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

AurelienFT
Copy link
Contributor

@AurelienFT AurelienFT commented Jan 2, 2025

Description

Cache is now an option and can be enable or disabled for each rocksdb instances.

A new rocksdb config has been added to choose between the mode that open columns on database in a lazy way (useful for tests) and the mode that open all columns at once at start (useful for production and benches). Benches now use the rocksdb-production feature of fuel-core.

In order to be more future-proof on the database configuration options, a DatabaseConfig structure has been created and is used across the code.

Breaking change

Before, if max-database-cache-size was unspecified then DEFAULT_DATABASE_CACHE_SIZE was used.
Now it make the cache disabled.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

@AurelienFT AurelienFT added the breaking A breaking api change label Jan 2, 2025
@AurelienFT AurelienFT requested a review from a team January 2, 2025 10:03
@AurelienFT AurelienFT self-assigned this Jan 2, 2025
Copy link
Collaborator

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like CI fails=)

crates/fuel-core/src/state/rocks_db.rs Outdated Show resolved Hide resolved
crates/fuel-core/src/state/rocks_db.rs Show resolved Hide resolved
tests/test-helpers/src/builder.rs Outdated Show resolved Hide resolved
bin/fuel-core/src/cli/run.rs Outdated Show resolved Hide resolved
@AurelienFT AurelienFT requested review from xgreenx and a team January 2, 2025 16:37
benches/benches/transaction_throughput.rs Outdated Show resolved Hide resolved
bin/fuel-core/src/cli/run.rs Outdated Show resolved Hide resolved
bin/fuel-core/src/cli/run.rs Outdated Show resolved Hide resolved
crates/fuel-core/src/combined_database.rs Show resolved Hide resolved
crates/fuel-core/src/database.rs Show resolved Hide resolved
crates/fuel-core/src/state/rocks_db.rs Outdated Show resolved Hide resolved
@AurelienFT AurelienFT requested a review from xgreenx January 2, 2025 17:50
benches/benches/transaction_throughput.rs Outdated Show resolved Hide resolved
tests/test-helpers/src/builder.rs Outdated Show resolved Hide resolved
tests/tests/aws_kms.rs Outdated Show resolved Hide resolved
tests/tests/health.rs Outdated Show resolved Hide resolved
tests/tests/health.rs Outdated Show resolved Hide resolved
tests/tests/relayer.rs Outdated Show resolved Hide resolved
tests/tests/relayer.rs Outdated Show resolved Hide resolved
@AurelienFT AurelienFT requested review from xgreenx and a team January 3, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants