Skip to content

feat: adaptive for loading journal file or journal kv during loadJournal#2406

Merged
zzzckck merged 4 commits intobnb-chain:developfrom
jingjunLi:feat-journal-file-convert
Apr 19, 2024
Merged

feat: adaptive for loading journal file or journal kv during loadJournal#2406
zzzckck merged 4 commits intobnb-chain:developfrom
jingjunLi:feat-journal-file-convert

Conversation

@jingjunLi
Copy link
Copy Markdown
Contributor

@jingjunLi jingjunLi commented Apr 18, 2024

Description

During loading, If it is not necessary to judge based on --journalfile, handle it based on the existence of journalkv or journalfile;

  • If trieJournal exists in the database, load it from the database first;
  • If the journal file exists, load it from the journal file;
  • If neither exists, treat it as a kv;

During persistence:
Handle it based on --journalfile, without considering whether it was journalkv or journalfile before;

Verification cases:

  • Start and shut down using the kv method; Verify (type: journal kv);
  • Start by specifying --journalfile to use journal file, and verify if it can start (type: journal kv), then shut down to save (type: journal file); Verify block tracking;
  • Start using the kv method again (type: journal file); Verify block tracking; then shut down to save (type: journal kv); Verify block tracking again;
  • Start by specifying --journalfile;

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@jingjunLi jingjunLi requested a review from zzzckck as a code owner April 18, 2024 08:07
@jingjunLi jingjunLi force-pushed the feat-journal-file-convert branch from 59df78e to 5472757 Compare April 18, 2024 08:41
@jingjunLi jingjunLi requested review from RenRick and fynnss April 18, 2024 09:04
@jingjunLi jingjunLi changed the title feat: journal file convert feat: Adaptive adaptation for loading journal file or journal kv during loadJournal Apr 18, 2024
@jingjunLi jingjunLi changed the title feat: Adaptive adaptation for loading journal file or journal kv during loadJournal feat: Adaptive for loading journal file or journal kv during loadJournal Apr 18, 2024
@jingjunLi jingjunLi changed the title feat: Adaptive for loading journal file or journal kv during loadJournal feat: adaptive for loading journal file or journal kv during loadJournal Apr 18, 2024
Copy link
Copy Markdown
Contributor

@fynnss fynnss left a comment

Choose a reason for hiding this comment

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

LGTM

@zzzckck zzzckck merged commit d653cda into bnb-chain:develop Apr 19, 2024
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.

3 participants