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

Transactions #1

Open
FabrizioG202 opened this issue Nov 22, 2023 · 0 comments
Open

Transactions #1

FabrizioG202 opened this issue Nov 22, 2023 · 0 comments
Labels
help-needed We currently need help with a specific implementation.

Comments

@FabrizioG202
Copy link
Owner

FabrizioG202 commented Nov 22, 2023

We are currently exploring the possibility of implementing transactions to enhance the reliability of our database. I'm inclined towards a Write-Ahead Log (WAL) approach and am eagerly seeking your insights and suggestions.

Considerations

Right now, we're not focusing on handling multiple transactions at the same time, so managing concurrency isn't a top priority for us at this point

Proposed Implementation Strategy

  1. Logging:
    Every transaction will be recorded in the WAL prior to initiating any alterations in the database. This ensures a chronological record of all transactions, bolstering data integrity.

  2. Commit Process
    A transaction will only be marked as committed after its entry is securely logged in the WAL. This step is crucial to maintain a consistent and reliable state within the database.

  3. Recovery Mechanism
    In scenarios of system failure, the WAL will serve a dual purpose:

  • Redoing Committed Transactions: Transactions that were committed but not yet applied to the database will be redone.
  • Undoing Uncommitted Transactions: Transactions that were not committed at the time of failure will be undone.

Request for Collaboration
I'm new to implementing database systems from scratch, so I'd really appreciate any help to ensure we get this implementation right on our first try.

Therefore, I welcome any specific strategies, best practices, or general suggestions you might have. Please feel free to share your thoughts below!

@FabrizioG202 FabrizioG202 added the help-needed We currently need help with a specific implementation. label Nov 22, 2023
@FabrizioG202 FabrizioG202 pinned this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-needed We currently need help with a specific implementation.
Projects
Status: No status
Development

No branches or pull requests

1 participant