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

[feature]: Prevent Switching from Native SQL to KV SQL After Invoice Migration #9434

Closed
Tracked by #6288
bhandras opened this issue Jan 22, 2025 · 0 comments · Fixed by #9438
Closed
Tracked by #6288

[feature]: Prevent Switching from Native SQL to KV SQL After Invoice Migration #9434

bhandras opened this issue Jan 22, 2025 · 0 comments · Fixed by #9438
Assignees
Labels
enhancement Improvements to existing features / behaviour

Comments

@bhandras
Copy link
Collaborator

Description
Following the changes introduced in PR #8831, it would be desirable to prevent users from switching back from native SQL to KV SQL after the invoice migration process. This is crucial to avoid potential side effects such as lingering invoices or partial state being stored in KV/native tables.

Proposed Solution
Introduce a mechanism to detect if the invoice migration has already occurred. A possible approach is to add a "tombstone" key to the KV top-level invoices bucket. This key would act as a marker indicating that the migration has been completed. Upon startup, the system can check for this marker, and if it exists, prevent the user from manually overriding the migration.

Steps

  • Add a "tombstone" key to the KV top-level invoices bucket during the invoice migration process.
  • Implement a check during startup to verify if the "tombstone" exists.
  • If the "tombstone" is present and the user attempts to switch back to KV SQL, block the operation and log an appropriate error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant