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

feat: Add wal replay and full checkpoint #1

Merged
merged 5 commits into from
Dec 2, 2024
Merged

Conversation

loloxwg
Copy link
Owner

@loloxwg loloxwg commented Dec 2, 2024

Add enable_checkpointing control for checkpoint threads
Implemented an atomic flag to manage the state of checkpointing, ensuring that checkpoint threads are not redundantly initiated or terminated. This change adds a safety check in the RunCheckPointThread and StopFlushThread methods to prevent multiple threads from starting or stopping concurrently. Adjusted related configurations and tests to support and validate this new behavior.

Refactor the cursor increment in seq_scan_executor.cpp for consistency and code clarity. Add the missing include for common/config.h in string_util.h to ensure necessary configurations are available.
Re-enabled logging in key parts of the system by uncommenting relevant sections. This change supports tracking transaction logs and ensures proper log flushing during commits, aborts, and checkpoints for recovery. Additionally, tests related to undo, redo, checkpoints, and performance monitoring were adjusted to reflect these logging functionalities.
Added support for logging create table operations, including changes to the LogRecord class to handle the new CREATETABLE type. Introduced serialization and deserialization methods in column structures to facilitate this. Additionally, updated relevant components like `catalog_` and `log_recovery_` to manage redo and undo operations for create table logs.
Implemented a checkpointing mechanism in the CheckpointManager using a separate thread for automatic periodic checkpoints. The new functionality includes starting and stopping the checkpoint thread, integrating it within transaction management, and adjusting configurations such as checkpoint timeout duration. This enhancement aims to improve system reliability and data consistency by ensuring checkpoints are taken periodically without manual intervention.
Implemented an atomic flag to manage the state of checkpointing, ensuring that checkpoint threads are not redundantly initiated or terminated. This change adds a safety check in the `RunCheckPointThread` and `StopFlushThread` methods to prevent multiple threads from starting or stopping concurrently. Adjusted related configurations and tests to support and validate this new behavior.
@loloxwg loloxwg merged commit 2c1627f into master Dec 2, 2024
0 of 6 checks passed
@loloxwg loloxwg deleted the bustub-2022.100 branch December 2, 2024 06:37
loloxwg pushed a commit that referenced this pull request Dec 2, 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.

1 participant