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

Remove everything related to accounts_db_stats_recomputed_on_upgrade #6301

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

jasonz-dfinity
Copy link
Contributor

@jasonz-dfinity jasonz-dfinity commented Jan 31, 2025

Motivation

accounts_db_stats_recomputed_on_upgrade is no longer useful after the migration of accounts to stable structures. It is always opt false, which can be verified by dfx canister --ic call qoctq-giaaa-aaaaa-aaaea-cai get_stats | grep accounts_db_stats_recomputed_on_upgrade

Changes

Remove everything related to accounts_db_stats_recomputed_on_upgrade

Tests

N/A

Related PRs

Previous | Next

github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2025
…Maybe (#6298)

# Motivation

`Partitions` is already "global", in the sense that even in unit tests
([ic_stable_structures::VectorMemory](https://github.com/dfinity/stable-structures/blob/69ed47f9b5001af67d650c714cd56ec3ee0ef2bb/src/lib.rs#L38))
is an `Rc<RefCell<Vec<u8>>>`, and operations to various memory
partitions read/write from/to the bytes owned by the `Rc`. Therefore, it
makes sense for `Partitions` to be a `thread_local!` variable. On the
other hand, `PartitionsMaybe` is only useful when there can be 2 cases
(raw/managed memory), which is no longer the case after the migration.

# Changes

1. Define `PARTITIONS` `thread_local` variable and add accessors
2. Remove everything related to `PartitionsMaybe` and simplify dead code

# Tests

N/A since it's mostly trivial refactoring. Tests under
`rs/backend/src/state/tests.rs` should cover the code changed in this
PR.

# Related PRs

[Previous](#6297) |
[Next](#6301)
Base automatically changed from jason/NNS1-3030-2 to main January 31, 2025 19:49
@jasonz-dfinity jasonz-dfinity added this pull request to the merge queue Jan 31, 2025
Merged via the queue into main with commit 042e60f Jan 31, 2025
32 checks passed
@jasonz-dfinity jasonz-dfinity deleted the jason/NNS1-3030-3 branch January 31, 2025 21:55
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.

2 participants