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

Use rocks db as cache #139

Closed
wants to merge 7 commits into from
Closed

Use rocks db as cache #139

wants to merge 7 commits into from

Conversation

Daksh14
Copy link
Contributor

@Daksh14 Daksh14 commented May 9, 2023

  1. Use rocks db as cache
  2. Seperate the cache database per network. Create new db for different network and so on.

@Daksh14 Daksh14 changed the title Use rocks db as cache [WIP] Use rocks db as cache May 9, 2023
@Daksh14 Daksh14 force-pushed the rocks_db_cache branch 2 times, most recently from 639691b to c3c40e1 Compare May 9, 2023 07:28
@Daksh14 Daksh14 changed the title [WIP] Use rocks db as cache Use rocks db as cache May 10, 2023
@Daksh14
Copy link
Contributor Author

Daksh14 commented May 10, 2023

Pinging @goshawk-3 as you have experience with rocksdb, here we are using it as a persistent disk database for caching data. Any reviews?

This PR will pass once #140 is merged

Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

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

If this PR won't work alone, close #140 and apply those changes here directly.

Furthermore, change PR and commit descriptions in order to specify which issue(s) will be resolved

Cargo.toml Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to not remove microkelvin?

src/cache.rs Outdated
}

let mut key_data = self.data.get_mut(&psk)?.expect("psk");
self.write_batch.put(psk_bytes, data.encode_to_vec());
Copy link
Member

Choose a reason for hiding this comment

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

Having the whole note set encoded into a singled field/row is something we would like to avoid (mostly to prevent tech-debt that will be raised when we'll start to handle rollback and note tagging).

src/cache.rs Outdated Show resolved Hide resolved
src/cache.rs Outdated Show resolved Hide resolved
@Daksh14
Copy link
Contributor Author

Daksh14 commented May 16, 2023

@goshawk-3 @herr-seppia @ZER0
This is discarded by #141

@Daksh14 Daksh14 closed this May 16, 2023
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.

3 participants