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

🐛 Only initialize WAL once #216

Merged
merged 7 commits into from
Dec 10, 2023
Merged

🐛 Only initialize WAL once #216

merged 7 commits into from
Dec 10, 2023

Conversation

aaronleopold
Copy link
Collaborator

  • I added a new field to the server_config called initial_wal_setup_complete. As the name suggests, it will be updated to true once Stump sets the journal_mode to WAL. It is important to NEVER update this flag manually.

    • The boot flow is now as follows: 1. run migrations 2. check for/create server_config 3. check for wal flag and initialize it if needed
  • I added a new sub-command system to the CLI, however you shouldn't need to use it:

     ❯ ./stump_server system --help
     Subcommands for interacting with the system commands
    
     Usage: stump_server system <COMMAND>
     
     Commands:
       set-journal-mode  Set the journal mode for the database. Please use this command with caution!
       help              Print this message or the help of the given subcommand(s)
      
     Options:
       -h, --help  Print help
    
     ❯ ./stump_server system set-journal-mode --help
     Set the journal mode for the database. Please use this command with caution!
    
     Usage: stump_server system set-journal-mode --mode <MODE>
    
     Options:
         --mode <MODE>  The journal mode to set
     -h, --help         Print help
  • I also added the mocking feature to Prisma to enable better testing down the road

@aaronleopold aaronleopold merged commit 5c4bf87 into develop Dec 10, 2023
7 checks passed
@aaronleopold aaronleopold deleted the al/fix-wal-shit branch December 31, 2023 02:45
@aaronleopold aaronleopold mentioned this pull request Feb 18, 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