Skip to content

Conversation

@dcapwell
Copy link
Contributor

@dcapwell dcapwell commented Sep 25, 2024


public static void visitUDTs(TableMetadata metadata, Consumer<UserType> fn)
{
Set<UserType> udts = CassandraGenerators.extractUDTs(metadata);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could make this more efficient but figured reusing is best as its been stable...

Invariants.checkState(cfs != null, "Unable to find table %s", id);
BigInteger targetSplitSize = BigInteger.valueOf(Math.max(1, cfs.estimateKeys() / 1_000_000));

List<AsyncChain<?>> syncs = new ArrayList<>(ranges.size());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could add visibility into what's going on, but there is an assumption that Benedict is making a cheaper option, so holding off doing that work hoping that option can replace this splitting.

{
Transformation.Result result = iter.next().applyTo(metadata);
assert result.isSuccess();
assert result.isSuccess() : result.toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when debugging my patch this was useful...

{
out.writeUTF(dc.name);
out.writeUnsignedVInt(dc.weight);
out.writeUnsignedVInt32(dc.weight);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

by actually trying to serialize this I found this bug... why do we keep out.writeUnsignedVInt around if we don't allow it anymore? 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this now conflicts with https://issues.apache.org/jira/browse/CASSANDRA-19954 on trunk....

Believe Sam/Marcus plan to also add more to V3... so Accord is likely V4, but with the MIN_ACCORD_VERSION it should be easier to handle when that happens

Copy link
Contributor

@beobal beobal left a comment

Choose a reason for hiding this comment

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

Mostly lgtm, but left a few comments.

@dcapwell dcapwell force-pushed the CASSANDRA-18675 branch 2 times, most recently from 1c1fa50 to 2f0e712 Compare September 28, 2024 05:05
…ved from Accord when DROP TABLE is performed

patch by David Capwell, Sam Tunnicliffe; reviewed by Sam Tunnicliffe for CASSANDRA-18675
@dcapwell dcapwell merged commit c4d0f8c into apache:cep-15-accord Sep 28, 2024
@dcapwell dcapwell deleted the CASSANDRA-18675 branch September 28, 2024 06:41
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.

2 participants