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

[Bug] Sqlite pragmas are not applied correctly #681

Open
vbehar opened this issue Sep 27, 2024 · 1 comment · May be fixed by #682
Open

[Bug] Sqlite pragmas are not applied correctly #681

vbehar opened this issue Sep 27, 2024 · 1 comment · May be fixed by #682
Labels
bug Something isn't working

Comments

@vbehar
Copy link

vbehar commented Sep 27, 2024

What are you really trying to do?

I'm trying to start a dev-server with specific sqlite settings (pragma), for example to enable WAL journal

Describe the bug

  • The parameters set on the CLI are not applied to the sqlite database
  • Temporal CLI doesn't support all pragma statements supported by sqlite

Minimal Reproduction

  • temporal server start-dev --db-filename temporal.sqlite --sqlite-pragma journal_mode=WAL

this should create 3 files:

  • temporal.sqlite
  • temporal.sqlite-shm
  • temporal.sqlite-wal

but only 1 is created: temporal.sqlite - which means that the journal_mode=WAL pragma statement has not been applied to the sqlite DB

also, not all pragma statements supported by sqlite in https://www.sqlite.org/pragma.html are accepted by temporal CLI. the CLI only support 2 statements: journal_mode and synchronous.

Environment/Versions

  • Temporal CLI Version: v1.1.0

Additional context

@vbehar vbehar added the bug Something isn't working label Sep 27, 2024
vbehar added a commit to vbehar/temporal-cli that referenced this issue Sep 27, 2024
fixes temporalio#681

- remove the extra underscore in the key
- remove the pragma key check - let's support any pragma
@vbehar vbehar linked a pull request Sep 27, 2024 that will close this issue
@cretz
Copy link
Member

cretz commented Sep 27, 2024

Thanks! Looking at PR.

vbehar added a commit to vbehar/temporal-cli that referenced this issue Sep 28, 2024
fixes temporalio#681

- remove the extra underscore in the key
- remove the pragma key check - let's support any pragma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants