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

Allow custom SAI components discovery #1338

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pcmanus
Copy link

@pcmanus pcmanus commented Oct 8, 2024

Refactor the code that "discover" which SAI components files an SSTable has to allow making that code customizable. The default behavior remains the existing one, that is the TOC file is consulted, with a fallback to scanning disk if the TOC file is missing or corrupted.

The way to customize this behavior is similar to what SSTableWatcher does: a new system property, -Dcassandra.sai.custom_components_discovery_class allows to load a specific class (that extends the IndexCoomponentDiscovery class) instead of the default.

As part of the refactor to make this new customisability easier, this introduces a new ComponentsBuildId class that is the pair of the version and generation of a group of components, since this is whatultimately defines a given component "group" build.

This is a WIP in the context of https://github.com/riptano/cndb/issues/10889.

Refactor the code that "discover" which SAI components files an SSTable
has to allow making that code customizable. The default behavior remains
the existing one, that is the TOC file is consulted, with a fallback to
scanning disk if the TOC file is missing or corrupted.

The way to customize this behavior is similar to what `SSTableWatcher`
does: a new system property, `-Dcassandra.sai.custom_components_discovery_class`
allows to load a specific class (that extends the `IndexCoomponentDiscovery` class)
instead of the default.

As part of the refactor to make this new customisability easier, this
introduces a new `ComponentsBuildId` class that is the pair of the
version and generation of a group of components, since this is what
ultimately defines a given component "group" build.
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.

1 participant