[
https://issues.apache.org/jira/browse/CASSSIDECAR-511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jyothsna Konisa updated CASSSIDECAR-511:
----------------------------------------
Bug Category: Parent values: Code(13163)
Complexity: Normal
Component/s: CDC
Discovered By: Adhoc Test
Fix Version/s: 0.5
Reviewers: Yifan Cai
Severity: Normal
Status: Open (was: Triage Needed)
> Make the CDC CassandraBridge injectable
> ---------------------------------------
>
> Key: CASSSIDECAR-511
> URL: https://issues.apache.org/jira/browse/CASSSIDECAR-511
> Project: Sidecar for Apache Cassandra
> Issue Type: Bug
> Components: CDC
> Reporter: Jyothsna Konisa
> Assignee: Jyothsna Konisa
> Priority: Major
> Fix For: 0.5
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> CDC components in Sidecar obtain their Cassandra bridge through the static
> CdcBridgeFactory.get(releaseVersion), called separately in CdcPublisher,
> CdcSchemaSupplier, SidecarCdcOptions, SidecarCqlToAvroSchemaConverter and
> CassandraClusterSchemaMonitor. Because the lookup is static and repeated at
> each call site, deployments cannot customize how the bridge is obtained, and
> tests have to mock static methods.
> This change makes the bridge a Guice binding:
> - CdcModule provides CassandraBridge from the release version of the first
> available instance.
> - The CDC components inject Provider<CassandraBridge> and call get() where
> they previously called the static factory.
> - SidecarCdcOptions.version() returns the version of the provided bridge, and
> still falls back to FOURZERO when the release version is not supported.
> The binding is intentionally unscoped, so that the bridge is resolved on each
> use rather than once:
> - The local Cassandra instances may be unreachable when Sidecar starts, and a
> singleton would fail injection at startup.
> - The instances may be upgraded to another Cassandra version while Sidecar
> runs, and a singleton would keep using the bridge of the previous version.
> CdcBridgeFactory caches bridges per version, so repeated get() calls return
> the same bridge until the version changes.
> Deployments can now customize bridge resolution by overriding the single
> CassandraBridge binding.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]