Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Remove Blockstore manual compaction code#28409

Merged
steviez merged 1 commit intosolana-labs:masterfrom
steviez:remove_compaction
Oct 28, 2022
Merged

Remove Blockstore manual compaction code#28409
steviez merged 1 commit intosolana-labs:masterfrom
steviez:remove_compaction

Conversation

@steviez
Copy link
Copy Markdown
Contributor

@steviez steviez commented Oct 15, 2022

Problem

The manual Blockstore compaction that was being initiated from LedgerCleanupService has been disabled for quite some time in favor of several optimizations.

Summary of Changes

Rip out the dead code (and eliminate one thread)

I was poking around LedgerCleanupService following an idea I discussed with Yueh-Hsuan, and then was reminded of the dead code in there. So, I decided to pick up some of the cleanup from #27529. However, that PR modified compaction and purge routines. I thought it'd be more manageable to handle one item per PR, so here is just the compaction stuff. The compaction removal is more straightforward than the purge change as well, so this should be a less complex review.

Comment thread core/tests/ledger_cleanup.rs
Comment thread core/tests/ledger_cleanup.rs Outdated
Comment thread validator/src/main.rs
@steviez steviez marked this pull request as ready for review October 15, 2022 13:45
Copy link
Copy Markdown
Contributor

@yhchiang-sol yhchiang-sol left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! The removal of the manual compaction code looks good to me.

The only real comment is the ending check of the ledger_cleanup_test.

Comment thread core/src/ledger_cleanup_service.rs
Comment thread ledger/src/blockstore/blockstore_purge.rs
Comment thread core/src/ledger_cleanup_service.rs
Comment thread core/tests/ledger_cleanup.rs Outdated
Comment thread core/tests/ledger_cleanup.rs
Comment thread core/tests/ledger_cleanup.rs
Comment thread validator/src/main.rs
Comment thread core/tests/ledger_cleanup.rs Outdated
@steviez steviez requested a review from yhchiang-sol October 27, 2022 17:10
Copy link
Copy Markdown
Contributor

@yhchiang-sol yhchiang-sol left a comment

Choose a reason for hiding this comment

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

Great we share thoughts in common. Here're my thoughts about this:

  • Move forward with this PR. Improvements/changes for the test go to a separate PR.
  • Remove the ending manual compaction check in the test in this PR.

Comment thread core/tests/ledger_cleanup.rs
The manual Blockstore compaction that was being initiated from
LedgerCleanupService has been disabled for quite some time in favor of
several optimizations.

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
Copy link
Copy Markdown
Contributor

@yhchiang-sol yhchiang-sol left a comment

Choose a reason for hiding this comment

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

LGTM!

@steviez steviez merged commit 2272fd8 into solana-labs:master Oct 28, 2022
@steviez steviez deleted the remove_compaction branch October 28, 2022 08:39
@steviez
Copy link
Copy Markdown
Contributor Author

steviez commented Oct 28, 2022

I think Ryo is currently preoccupied with some other more important stuff, but given that Ryo was the one who initially made the PR, pushing this in and will be happy to do address any potential issues in followup PRs.

There will probably be a subsequent PR at some point to rip out the purge stuff. We should 100% wait for ship-its from Tyera and/or Ryo on that one

gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
The manual Blockstore compaction that was being initiated from
LedgerCleanupService has been disabled for quite some time in favor of
several optimizations.

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants