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

Staged writes can end up in invalid state #1993

Open
vasil-pashov opened this issue Nov 8, 2024 · 0 comments
Open

Staged writes can end up in invalid state #1993

vasil-pashov opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vasil-pashov
Copy link
Collaborator

Describe the bug

Currently the flow for compact_incomplete/sort_merge is

  1. Read APPEND_DATA keys
  2. Compact the result into TABLE_DATA
  3. Create INDEX_DATA
  4. Remove all APPEND_DATA keys
  5. Create new version key
  6. Update ref key

If an the program dies right after APPEND_DATA keys are deleted but before the version key is created the symbol is in incomplete/unreadable state. The symbol won't appear in the list of incomplete symbols (because there are no append data keys) it won't be in symbol list as well, but there will be orphaned table data and index keys.

Steps/Code to Reproduce

Start compaction and kill the process right after sort_merge_impl or compact_incomplete_impl.

Expected Results

The symbol should be either in the list of incomplete symbols or in the symbol list.

To achieve this the sequence of operations must be changed. So that the append data keys are deleted after the ref key is updated.

OS, Python Version and ArcticDB Version

all

Backend storage used

No response

Additional Context

No response

@vasil-pashov vasil-pashov added the bug Something isn't working label Nov 8, 2024
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

No branches or pull requests

2 participants