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

DBZ-2975: Extract offset context from object states to method signatures #13

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

morozov
Copy link

@morozov morozov commented Feb 27, 2021

Closes #8.

It should be possible to reuse the graph of components under ChangeEventSourceCoordinator for processing multiple partitions represented via OffsetContext sequentially. Specifically, StreamingChangeEventSource#execute() and SnapshotChangeEventSource#execute() should accept an offset context and explicitly pass it down the line.

The following classes and hierarchies no longer have the offset context as part of their state which is now part of their interface:

  1. ChangeEventSourceFactory (including all connector implementations).
  2. SnapshotChangeEventSource (including snapshot/streaming interfaces and all connector implementations).
  3. Connector-specific classes (mysql.EventBuffer).

Certain classes are parametrized with <O extends OffsetContext>. Since the graph of components under the SourceTask implementation will be dealing with a set of contexts, there may be no place to do typecasting for the entire set. Additionally, the use of parameterized types looks safer:

  1. BaseSourceTask
  2. ChangeEventSourceCoordinator
  3. ChangeEventSourceFactory
  4. SnapshotChangeEventSource
  5. SnapshotResult

@morozov morozov marked this pull request as ready for review February 27, 2021 04:43
@morozov morozov merged commit c604661 into sugarcrm:DBZ-2975 Mar 1, 2021
@morozov morozov deleted the issues/8 branch March 1, 2021 19:02
@morozov morozov linked an issue Mar 2, 2021 that may be closed by this pull request
@morozov morozov added the SQL Server Debezium connector for SQL Server label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SQL Server Debezium connector for SQL Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract offset context from object states to method signatures
2 participants