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

sstable: convert RawWriter into an interface #3883

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Aug 22, 2024

Convert RawWriter into an interface that's satisfied by the existing RawRowWriter type. Future work will introduce a RawColWriter that writes sstables with columnar blocks.

@jbowens jbowens requested a review from a team as a code owner August 22, 2024 21:22
@jbowens jbowens requested a review from sumeerbhola August 22, 2024 21:22
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 19 files reviewed, 2 unresolved discussions (waiting on @jbowens and @sumeerbhola)


sstable/writer.go line 247 at r1 (raw file):

	Error() error
	// IsStrictObsolete returns true if the writer is configured to write and
	// enforce a 'strict obsolete' sstable.

[nit] What does "enforce" mean here? It used to mean that it would disallow Add() but that's not even part of the interface..


sstable/writer.go line 260 at r1 (raw file):

	// responsibility of the caller. S1 is solely the responsibility of the
	// callee.
	AddWithForceObsolete(

[nit] add that forceObsolete should always be false if !IsStrictObsolete()

Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 19 files reviewed, 2 unresolved discussions (waiting on @RaduBerinde and @sumeerbhola)


sstable/writer.go line 247 at r1 (raw file):

Previously, RaduBerinde wrote…

[nit] What does "enforce" mean here? It used to mean that it would disallow Add() but that's not even part of the interface..

Expanded a bit and plugged a reference to the 'strict obsolete' discussion in format.go


sstable/writer.go line 260 at r1 (raw file):

Previously, RaduBerinde wrote…

[nit] add that forceObsolete should always be false if !IsStrictObsolete()

If !StrictObsolete(), forceObsolete may be true but it's not required to be true where a IsStrictObsolete() file requires it. I added a comment clarifying that it's optional for not strict obsolete tables.

Convert RawWRiter into an interface that's satisfied by the existing
RawRowWriter type. Future work will introduce a RawColWriter that writes
sstables with columnar blocks.
@jbowens
Copy link
Collaborator Author

jbowens commented Aug 23, 2024

TFTR!

@jbowens jbowens merged commit 3d1f61a into cockroachdb:master Aug 23, 2024
11 checks passed
@jbowens jbowens deleted the rawwriter-refac branch August 23, 2024 22:55
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.

3 participants