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

Proper way to determine if a chunk can be finalized #2463

Open
Bouncner opened this issue May 10, 2022 · 1 comment
Open

Proper way to determine if a chunk can be finalized #2463

Bouncner opened this issue May 10, 2022 · 1 comment

Comments

@Bouncner
Copy link
Collaborator

Currently, we lack a proper way to determine if a chunk can be finalized (and thus encoded). That means that all transactions are either committed or rollbacked.

#2457 might or might not remove a job that checked it this way:
if (mvcc_data->get_begin_cid(chunk_offset) == MvccData::MAX_COMMIT_ID) return CHUNK_NOT_FINALIZABLE;
However, reading the non-atomic begin_cid might be UB.

@Bouncner
Copy link
Collaborator Author

One thing that might help here is to count (atomic_int or alikes) how many Insert operations are currently still being active (uncommitted, not yet rollbacked) per chunk.

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

No branches or pull requests

1 participant