Skip to content

DBZ-8319 - Debezium readonly connection#5949

Closed
lgazire wants to merge 916 commits intodebezium:mainfrom
lgazire:DBZ-8319
Closed

DBZ-8319 - Debezium readonly connection#5949
lgazire wants to merge 916 commits intodebezium:mainfrom
lgazire:DBZ-8319

Conversation

@lgazire
Copy link
Contributor

@lgazire lgazire commented Oct 23, 2024

/packit test --labels oracle

@github-actions
Copy link

Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@lgazire
Copy link
Contributor Author

lgazire commented Oct 23, 2024

@jpechane what am i missing here? Is there something wrong with the message that i set?

@Naros
Copy link
Member

Naros commented Oct 24, 2024

Hi @lgazire please prefix the commit with DBZ-8319 and that will fix the failure.

@Naros
Copy link
Member

Naros commented Oct 24, 2024

/packit test --labels oracle

Copy link
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

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

Hi @lgazire, I haven't had a chance to look at the test failures yet, but I wanted to give some quick feedback on the implementation.

Also, a small nit-pick, can we use the notion of ReadOnly rather than Readonly in various places? To me the subtle capitalization just makes more logical sense from a naming perspective.

Finally, I noticed that the Jira issue specifically refers to non-CDB. Is there a reason why this needs to be scoped to just non-CDB instead of supporting both CDB and non-CDB? Oracle enforces CDB as the default since Oracle 19 and in fact they're predominately moving toward CDB being the only installation method, so not having a CDB solution to me is concerning.

Comment on lines +652 to +659
public static final Field LOG_MINING_PATH_DICTIONARY = Field.create("log.mining.path.dictionary")
.withDisplayName("Defines the dictionary path for the mining session")
.withType(Type.STRING)
.withWidth(Width.LONG)
.withImportance(Importance.LOW)
.withValidation(OracleConnectorConfig::validateDictionaryFromFile)
.withDescription("Path to LogMiner dictionary file. This is required when the database is in" +
" a different host than the Debezium connector");
Copy link
Member

Choose a reason for hiding this comment

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

I don't believe the description here is technically accurate. The dictionary file is required because the connector is capturing changes from a read-only replica where the data dictionary details may not be available and where LogMiner is unable to write to the target database. Perhaps it makes more sense to simply say "this is required when using the connector against a read-only database replica."

Comment on lines +661 to +666
public static final Field LOG_MINING_READONLY_HOSTNAME = Field.create("log.mining.readonly.hostname")
.withDisplayName("Read-only hostname for the Oracle RAC cluster.")
.withType(Type.STRING)
.withWidth(Width.MEDIUM)
.withImportance(Importance.LOW)
.withDescription("The readonly hostname for the Oracle RAC cluster. This is used to determine the primary node in the RAC cluster.");
Copy link
Member

Choose a reason for hiding this comment

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

Lets avoid the use of Oracle RAC here, that's misleading and unnecessary. I'd also rephrase the description simply "The hostname the connector will use to connect and perform read-only operations for the the replica" or something like this.

Comment on lines +28 to +36
@Override
public JdbcConnection prepareUpdate(String stmt, StatementPreparer preparer) {
throw new UnsupportedOperationException("Updates are not allowed for read-only connections");
}

@Override
public JdbcConnection executeWithoutCommitting(String... statements) {
throw new UnsupportedOperationException("Updates are not allowed for read-only connections");
}
Copy link
Member

Choose a reason for hiding this comment

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

It seems odd to avoid the use of executeWithoutCommitting versus allowing execute. Both are capable of making modifications to the underlying database in their own ways, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are correct, i will make the changes.

@github-actions
Copy link

Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@github-actions
Copy link

github-actions bot commented Nov 8, 2024

Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@lgazire
Copy link
Contributor Author

lgazire commented Nov 8, 2024

After a while (sorry, busy with work) i changed the commit message, should i do something else?

@Naros
Copy link
Member

Naros commented Nov 20, 2024

/packit test --labels oracle

@lgazire
Copy link
Contributor Author

lgazire commented May 29, 2025

@Naros can you help me with what is missing here with the testing-farm? I can’t simulate it.

@jpechane
Copy link
Contributor

/packit test --labels oracle

@jpechane
Copy link
Contributor

@lgazire Thanks for coming back. I re-triggered the tests so we can fresh results.
Do you please plan to rebase the PR on the latest main?

Naros and others added 15 commits May 30, 2025 07:44
DBZ-7051 Use DebeziumException for null input validations.

Replaced IllegalArgumentException with DebeziumException in tests to align with the framework's exception handling standard.

Refactor import order in NamingStyleUtilsTest.
This update clarifies and enhances the documentation for column naming strategies by introducing new properties, such as `column.naming.style.enabled`, `column.naming.style`, `column.naming.prefix`, and `column.naming.suffix`.
Replaced direct property injection with explicit configuration methods in column and collection naming strategies, improving clarity and maintainability. Enhanced debug logging to provide better visibility into the naming transformation process and handled null cases for test scenarios in collection naming. Added fallback mechanisms and warnings for deprecated or invalid configurations.
vjuranek and others added 24 commits May 30, 2025 08:21
+ added docs for `-Dsource.connectors` argument to README.md
+ added shortcut "all" for `-Dsource.connector=all` to enable all source connectors (MySQL, Postgres, SQL Server and Oracle DB) for end-to-end tests

relates to https://issues.redhat.com/browse/DBZ-7996
- remove docs for ConvertCloudEventToSaveableForm SMT

relates to https://issues.redhat.com/browse/DBZ-7996
* address PR comments:
** rename `jdbc.type.Type` to `jdbc.type.JdbcType`
** fix kafkaCoordinates not always included in `allFields` but in a separate `kafkaFields` Map
** KafkaDebeziumSinkRecord not extend Kafka's Values class but use an inner class instead
** minor related fixes

relates to https://issues.redhat.com/browse/DBZ-7996
Thee config optiones were already released, thus we should keep them,
just make them deprecated.
Also add more validations.
Now it's correctly handled by deprecation field option.
Handle nested, complex and empty arrays and documents; unify array schema for array encoding
@Naros
Copy link
Member

Naros commented May 30, 2025

Hi @lgazire can we just rebase the few commits you originally had on top of main rather than importing hundreds of commits here?

@lgazire
Copy link
Contributor Author

lgazire commented May 30, 2025

Hi @Naros, @jpechane ! I did a git fetch and a rebase, after that i did a git push --force-with-lease.
I don’t know what i’m missing that is causing the list of commits that are not mine. Can you guys light me up?

@jpechane
Copy link
Contributor

jpechane commented Jun 2, 2025

@lgazire Hi, given current state of affairs I'd recommend you to reset --hard your branch on the latest main and then cherry-pick your commits on top of it and then force push to GitHub. This should ensure that the PR will again show only your new commits.

The other option is that you'll jsut close this PR. Create a new branch off the latest main, cherry pick commits and open a new PR.

@lgazire lgazire closed this Jun 3, 2025
@lgazire lgazire deleted the DBZ-8319 branch June 3, 2025 14:31
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.