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

refactor(storage): separate writing from builder. #499

Merged

Conversation

arkbriar
Copy link
Contributor

@arkbriar arkbriar commented Feb 18, 2022

Signed-off-by: arkbriar arkbriar@gmail.com

Separates the write logic from the rowset builder and also fixes the #493 .

close #110
close #493

I fix it by skipping the entire add rowset procedure. Not sure if it's legal in all circumstances, e.g. compact all rowsets in a table (empty and delete them all. Is it necessary to make sure as least one active rowset in the directory? @skyzh

…o fix compactor panic.

Signed-off-by: arkbriar <arkbriar@gmail.com>
@skyzh
Copy link
Member

skyzh commented Feb 19, 2022

Is it necessary to make sure as least one active rowset in the directory

No need. I'll take a look at this PR next week :)

@zzl200012
Copy link
Member

Others LGTM! Let @skyzh have a more detailed review then.

Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good work!


use crate::catalog::ColumnCatalog;

/// Raw columns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the meaning of Raw? Better to name it as EncodedColumn or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intended to be "in raw bytes". "Encoded" is better as with different encoders we get different bytes.
I'll fix it.

@skyzh skyzh enabled auto-merge (squash) February 21, 2022 02:38
…as an argument when flush.

Signed-off-by: arkbriar <arkbriar@gmail.com>
…EncodedColumn'

Signed-off-by: arkbriar <arkbriar@gmail.com>
auto-merge was automatically disabled February 21, 2022 02:51

Head branch was pushed to by a user without write access

@arkbriar arkbriar force-pushed the refactor/secondary-storage-rowset-writer branch from 4a5b4c2 to 089c8bc Compare February 21, 2022 02:51
@zzl200012 zzl200012 enabled auto-merge (squash) February 21, 2022 03:24
@zzl200012 zzl200012 merged commit 200a51b into risinglightdb:main Feb 21, 2022
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.

storage: compactor panics when no rows are in new RowSet storage: remove I/O operation in RowSetBuilder
3 participants