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

Revision 2 of the ksql storage impl #1054

Merged
merged 6 commits into from
Dec 7, 2020
Merged

Revision 2 of the ksql storage impl #1054

merged 6 commits into from
Dec 7, 2020

Conversation

EricWittmann
Copy link
Member

Hey @Apicurio/developers - this is a PR of a second revision/evolution of the kafka+sql hybrid model we've been working on. I think it captures most of what we documented in our design doc. There are still some missing pieces, but I think it's ready for review so we can identify and itemize the remaining tasks.

Copy link
Contributor

@famarting famarting left a comment

Choose a reason for hiding this comment

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

I leaved some comments but overall looks really good, good job :)

UUID reqId = ConcurrentUtil.get(submitter.submitRule(Str.ActionType.DELETE, GLOBAL_RULES_ID, null, null));
coordinator.waitForResponse(reqId);

// TODO find a better way to implement deleting all global rules? This isn't very scalable if we add more rules.
Copy link
Contributor

Choose a reason for hiding this comment

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

use here log compaction to remove all global rules at once? It's ok if not implemented now, but add a note here then

Copy link
Member Author

Choose a reason for hiding this comment

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

How would we use log compaction for this? We need multiple messages - one for each rule. No?

sqlStore.deleteArtifactVersion(key.getArtifactId(), key.getVersion());
return null;
case Clear:
sqlStore.deleteArtifactVersionMetaData(key.getArtifactId(), key.getVersion());
Copy link
Contributor

Choose a reason for hiding this comment

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

I was not aware we had overlapping concepts , having delete and clear is not perfect as the meaning is similar but I guess it's ok if we have no other option

Copy link
Member

Choose a reason for hiding this comment

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

What about joining both operations into a single one? Maybe I am missing something, but if the version is deleted, then the metadata can be safely deleted as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I didn't love this solution, but I didn't have a better one. I'm open to other options. The semantics here are actually:

  1. Delete == delete the artifact version
  2. Clear == delete the artifact version metadata

They are different actions associated with the same message key, which is important IMO for log compaction. If you can think of either a better action name, or another approach, I'm happy to hear it.

Copy link
Member

@carlesarnal carlesarnal left a comment

Choose a reason for hiding this comment

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

Besides the concern with the transactional methods, LGTM. Nice job!

@EricWittmann EricWittmann merged commit b4feed1 into Apicurio:master Dec 7, 2020
@EricWittmann EricWittmann deleted the feat/ksql-rev2 branch December 7, 2020 14:26
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