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

Initialize fork graph in program cache during bank_forks creation #33810

Merged
merged 5 commits into from
Oct 23, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Oct 22, 2023

Problem

The instance of fork_graph in LoadedPrograms cache is not initialized in all the tests.

Summary of Changes

  • Move code to set fork_graph in BankForks constructors
  • Rename constructor to indicate that it's returning Arc<RwLock<>>
  • Update tests

Fixes #

@pgarg66 pgarg66 force-pushed the set-fork-graph branch 2 times, most recently from 27567f9 to e3804b5 Compare October 22, 2023 13:34
@pgarg66 pgarg66 force-pushed the set-fork-graph branch 2 times, most recently from 502d5c7 to 033e78e Compare October 22, 2023 23:57
@pgarg66
Copy link
Contributor Author

pgarg66 commented Oct 23, 2023

The need for this change was identified due to failing tests in #33806

@pgarg66 pgarg66 requested a review from Lichtso October 23, 2023 00:52
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #33810 (0482615) into master (abf3b3e) will decrease coverage by 0.1%.
The diff coverage is 96.8%.

@@            Coverage Diff            @@
##           master   #33810     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         807      807             
  Lines      217406   217428     +22     
=========================================
+ Hits       178043   178047      +4     
- Misses      39363    39381     +18     

@pgarg66 pgarg66 marked this pull request as ready for review October 23, 2023 01:01
@pgarg66 pgarg66 merged commit 9d42cd7 into solana-labs:master Oct 23, 2023
32 checks passed
@pgarg66 pgarg66 added the v1.17 PRs that should be backported to v1.17 label Oct 23, 2023
@pgarg66 pgarg66 deleted the set-fork-graph branch October 23, 2023 16:33
mergify bot pushed a commit that referenced this pull request Oct 23, 2023
…33810)

* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests

(cherry picked from commit 9d42cd7)

# Conflicts:
#	core/src/repair/repair_service.rs
#	core/tests/epoch_accounts_hash.rs
#	ledger/src/blockstore_processor.rs
#	rpc/src/rpc_service.rs
#	runtime/src/bank/tests.rs
mergify bot added a commit that referenced this pull request Oct 23, 2023
…ion (backport of #33810) (#33817)

* Initialize fork graph in program cache during bank_forks creation (#33810)

* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests

(cherry picked from commit 9d42cd7)

# Conflicts:
#	core/src/repair/repair_service.rs
#	core/tests/epoch_accounts_hash.rs
#	ledger/src/blockstore_processor.rs
#	rpc/src/rpc_service.rs
#	runtime/src/bank/tests.rs

* fix merge conflicts

---------

Co-authored-by: Pankaj Garg <pankaj@solana.com>
anwayde pushed a commit to firedancer-io/solana that referenced this pull request Nov 16, 2023
…ion (backport of solana-labs#33810) (solana-labs#33817)

* Initialize fork graph in program cache during bank_forks creation (solana-labs#33810)

* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests

(cherry picked from commit 9d42cd7)

# Conflicts:
#	core/src/repair/repair_service.rs
#	core/tests/epoch_accounts_hash.rs
#	ledger/src/blockstore_processor.rs
#	rpc/src/rpc_service.rs
#	runtime/src/bank/tests.rs

* fix merge conflicts

---------

Co-authored-by: Pankaj Garg <pankaj@solana.com>
anwayde pushed a commit to firedancer-io/solana that referenced this pull request Nov 16, 2023
…ion (backport of solana-labs#33810) (solana-labs#33817)

* Initialize fork graph in program cache during bank_forks creation (solana-labs#33810)

* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests

(cherry picked from commit 9d42cd7)

# Conflicts:
#	core/src/repair/repair_service.rs
#	core/tests/epoch_accounts_hash.rs
#	ledger/src/blockstore_processor.rs
#	rpc/src/rpc_service.rs
#	runtime/src/bank/tests.rs

* fix merge conflicts

---------

Co-authored-by: Pankaj Garg <pankaj@solana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants