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

refactor: Improve logging and snapshot management #15571

Merged
merged 1 commit into from
May 20, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented May 18, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor: Improve logging and snapshot management

This commit introduces several enhancements to the snapshot management
system:

  • Improved Progress Logging for Snapshot Building

  • Introduction of SMEntry:

    • A new structure, SMEntry, has been introduced to represent all
      variants of a state-machine record. RaftStoreEntry is a supper
      set of SMEntry that includes both state machine record and log
      records.
  1. Asynchronous Snapshot Writing:
    • Added the spawn_writer_thread() function to facilitate the
      writing of snapshots in a separate thread, thereby improving the
      performance.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Refactoring

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label May 18, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review May 18, 2024 14:21
@drmingdrmer drmingdrmer requested a review from lichuang May 18, 2024 14:22
@drmingdrmer drmingdrmer force-pushed the 81-sm-entry branch 2 times, most recently from 2b38dca to 42e4b39 Compare May 19, 2024 03:12
This commit introduces several enhancements to the snapshot management
system:

- Improved Progress Logging for Snapshot Building

- **Introduction of `SMEntry`:**
   - A new structure, `SMEntry`, has been introduced to represent all
     variants of a state-machine record. `RaftStoreEntry` is a supper
     set of `SMEntry` that includes both state machine record and log
     records.

3. **Asynchronous Snapshot Writing:**
   - Added the `spawn_writer_thread()` function to facilitate the
     writing of snapshots in a separate thread, thereby improving the
     performance.
@drmingdrmer drmingdrmer merged commit cb29828 into databendlabs:main May 20, 2024
72 checks passed
@drmingdrmer drmingdrmer deleted the 81-sm-entry branch May 20, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant