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

CASSANDRA-18714 5.0 squashed SAI indexes for CQLSSTableWriter #3046

Conversation

smiklosovic
Copy link
Contributor

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

@smiklosovic smiklosovic force-pushed the CASSANDRA-18714-5.0-squashed branch 3 times, most recently from f6cb601 to a73d011 Compare January 15, 2024 21:48
@smiklosovic smiklosovic marked this pull request as ready for review January 16, 2024 15:16
{
if (!entry.left.equals(tableMetadata))
{
throw new IllegalStateException();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add exception message

{
DatabaseDescriptor.daemonInitialization();
}
private Supplier<CQLSSTableWriter.Builder> defaultBuilderSupplier = () -> CQLSSTableWriter.builder().removeSchemaAfterDone(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private Supplier<CQLSSTableWriter.Builder> defaultBuilderSupplier = () -> CQLSSTableWriter.builder().removeSchemaAfterDone(false);
private final Supplier<CQLSSTableWriter.Builder> defaultBuilderSupplier = () -> CQLSSTableWriter.builder().removeSchemaAfterDone(false);

Copy link
Contributor

@maedhroz maedhroz left a comment

Choose a reason for hiding this comment

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

Overall, LGTM

The only thing I'm not entirely sure of is whether we want the complexity of tracking currentTables outside the already existing static Schema state. Given the usage pattern of sequentially creating writers within the same JVM, we might consider an alternative where we just, rather than specifying removeSchemaAfterDone, tell the writer builder whether we want to overwrite existing/conflicting schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants