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

core: fix txs reindex after reindex from ancients crashed #25595

Closed
wants to merge 1 commit into from

Conversation

ucwong
Copy link
Contributor

@ucwong ucwong commented Aug 24, 2022

once tx reindex crashing, it will not repair the txs index again

@fjl fjl changed the title core/blockchain:fix txs reindex after reindex from ancients crashed core: fix txs reindex after reindex from ancients crashed Aug 30, 2022
// indices in the background.
frozen, _ := bc.db.Ancients()
if frozen > 0 {
txIndexBlock = frozen
Copy link
Member

Choose a reason for hiding this comment

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

It's not correct, previously we will only re-init the ancient blocks in this special corner case where state is empty but ancient store it not. With this change we will re-init the ancient blocks all the time.

I will try to figure out a proper solution to fix it.

@ligi ligi removed the status:triage label Sep 8, 2022
@rjl493456442
Copy link
Member

Hi @ucwong , I have an alternative to rework the tx indexer #25723

I don't quite understand why the current version will not work after crash. Can you explain a bit more?

@ucwong
Copy link
Contributor Author

ucwong commented Sep 9, 2022

Hi @ucwong , I have an alternative to rework the tx indexer #25723

I don't quite understand why the current version will not work after crash. Can you explain a bit more?

The blockchain is not empty at all , so txIndexBlock will alway be zero.

@holiman
Copy link
Contributor

holiman commented Sep 29, 2022

It's not correct, previously we will only re-init the ancient blocks in this special corner case where state is empty but ancient store it not. With this change we will re-init the ancient blocks all the time.

plus superseded by #25723

@holiman holiman closed this Sep 29, 2022
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.

5 participants