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

refactor: remove redundant flat storage methods from RuntimeAdapter #9117

Merged

Conversation

pugachAG
Copy link
Contributor

@pugachAG pugachAG commented May 26, 2023

With #9093 RuntimeAdapter has access to FlatStorageManager which makes all other flat storage related methods redundant. This PR removes those methods to keep RuntimeAdapter trait leaner.

@pugachAG pugachAG force-pushed the runtime-adapter-flat-state-cleanup branch from 7fb80a9 to d6d350d Compare May 26, 2023 13:05
@pugachAG pugachAG added the A-storage Area: storage and databases label May 26, 2023
@pugachAG pugachAG requested review from Longarithm and jbajic May 26, 2023 14:16
@pugachAG pugachAG marked this pull request as ready for review May 26, 2023 14:17
@pugachAG pugachAG requested a review from a team as a code owner May 26, 2023 14:17
@pugachAG pugachAG added the C-housekeeping Category: Refactoring, cleanups, code quality label May 26, 2023
@@ -82,15 +82,20 @@ impl FlatStorageManager {
/// the shard's flat storage state hasn't been set before, otherwise it panics.
/// TODO (#7327): this behavior may change when we implement support for state sync
/// and resharding.
pub fn add_flat_storage_for_shard(&self, shard_uid: ShardUId, flat_storage: FlatStorage) {
pub fn add_flat_storage_for_shard(&self, shard_uid: ShardUId) {
Copy link
Member

Choose a reason for hiding this comment

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

As we are here - can we fix the comment from like "Add a flat storage state for shard shard_id..." to "Creates FlatStorage for shard shard_uid..."?

@pugachAG pugachAG force-pushed the runtime-adapter-flat-state-cleanup branch from d6d350d to fe14e35 Compare May 30, 2023 08:52
@pugachAG pugachAG force-pushed the runtime-adapter-flat-state-cleanup branch from fe14e35 to 52a00e5 Compare May 30, 2023 08:52
@near-bulldozer near-bulldozer bot merged commit de56df5 into near:master May 30, 2023
nikurt pushed a commit that referenced this pull request May 31, 2023
…9117)

With #9093 `RuntimeAdapter` has access to `FlatStorageManager` which makes all other flat storage related methods redundant. This PR removes those methods to keep `RuntimeAdapter` trait leaner.
nikurt pushed a commit that referenced this pull request Jun 13, 2023
…9117)

With #9093 `RuntimeAdapter` has access to `FlatStorageManager` which makes all other flat storage related methods redundant. This PR removes those methods to keep `RuntimeAdapter` trait leaner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Area: storage and databases C-housekeeping Category: Refactoring, cleanups, code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants