DBZ-8319 - Debezium readonly connection#5949
DBZ-8319 - Debezium readonly connection#5949lgazire wants to merge 916 commits intodebezium:mainfrom
Conversation
|
Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key. |
|
@jpechane what am i missing here? Is there something wrong with the message that i set? |
|
Hi @lgazire please prefix the commit with |
|
/packit test --labels oracle |
There was a problem hiding this comment.
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.
...connector-oracle/src/main/java/io/debezium/connector/oracle/DualOracleConnectionFactory.java
Show resolved
Hide resolved
...connector-oracle/src/main/java/io/debezium/connector/oracle/DualOracleConnectionFactory.java
Outdated
Show resolved
Hide resolved
| 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"); |
There was a problem hiding this comment.
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."
| 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."); |
There was a problem hiding this comment.
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.
debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/OracleConnectorConfig.java
Outdated
Show resolved
Hide resolved
| @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"); | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yes, you are correct, i will make the changes.
debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/logminer/SqlUtils.java
Outdated
Show resolved
Hide resolved
debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/logminer/SqlUtils.java
Outdated
Show resolved
Hide resolved
debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/logminer/SqlUtils.java
Outdated
Show resolved
Hide resolved
debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/logminer/SqlUtils.java
Show resolved
Hide resolved
|
Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key. |
|
Hi @lgazire, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key. |
|
After a while (sorry, busy with work) i changed the commit message, should i do something else? |
|
/packit test --labels oracle |
|
@Naros can you help me with what is missing here with the testing-farm? I can’t simulate it. |
|
/packit test --labels oracle |
|
@lgazire Thanks for coming back. I re-triggered the tests so we can fresh results. |
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.
+ 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
|
Hi @lgazire can we just rebase the few commits you originally had on top of main rather than importing hundreds of commits here? |
|
@lgazire Hi, given current state of affairs I'd recommend you to 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. |
/packit test --labels oracle