This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 7be149176d9 IGNITE-26057 Present a few possible solution to
RecordAndTableSchemaMismatch errors in migrate-cache command (#6333)
7be149176d9 is described below
commit 7be149176d9abd2f94da4d883400fabe9d02da6d
Author: Tiago Marques Godinho <[email protected]>
AuthorDate: Thu Jul 31 11:42:49 2025 +0100
IGNITE-26057 Present a few possible solution to
RecordAndTableSchemaMismatch errors in migrate-cache command (#6333)
Co-authored-by: Igor Sapego <[email protected]>
---
.../RecordAndTableSchemaMismatchExceptionHandler.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/migration-tools/modules/migration-tools-cli/src/main/java/org/apache/ignite/migrationtools/cli/exceptions/RecordAndTableSchemaMismatchExceptionHandler.java
b/migration-tools/modules/migration-tools-cli/src/main/java/org/apache/ignite/migrationtools/cli/exceptions/RecordAndTableSchemaMismatchExceptionHandler.java
index a3594e4516c..ab2fbf04cbd 100644
---
a/migration-tools/modules/migration-tools-cli/src/main/java/org/apache/ignite/migrationtools/cli/exceptions/RecordAndTableSchemaMismatchExceptionHandler.java
+++
b/migration-tools/modules/migration-tools-cli/src/main/java/org/apache/ignite/migrationtools/cli/exceptions/RecordAndTableSchemaMismatchExceptionHandler.java
@@ -35,11 +35,23 @@ public class RecordAndTableSchemaMismatchExceptionHandler
implements ExceptionHa
if (!e.missingColumnsInRecord().isEmpty()) {
msgBuilder.append("\nRecord did not have the following fields
required by the table: ")
.append(String.join(", ",
e.missingColumnsInRecord()));
+
+ msgBuilder.append("\nConsider the following solutions:")
+ .append("\n * Manually edit the Ignite 3 table schema to
make the missing columns nullable.");
}
if (!e.additionalColumnsInRecord().isEmpty()) {
msgBuilder.append("\nThe following fields were present on the
record but not found in the table: ")
.append(String.join(", ", e.additionalColumnsInRecord()));
+
+ msgBuilder.append("\nConsider the following solutions:")
+ .append("\n * Manual Editing: Edit the Ignite 3 table
schema manually to add new columns for the additional fields."
+ + " Ensure that the new column types are
compatible with the record type.")
+ .append("\n * Ignore Additional Fields: Use the
IGNORE_COLUMN migration mode by applying the '--mode IGNORE_COLUMN'"
+ + " option. This approach will skip the migration
of those columns, resulting in the loss of their content.")
+ .append("\n * Store as JSON: Use the '--mode PACK_EXTRA'
option to store additional fields as JSON in an extra column."
+ + " While Ignite 3 does not natively support
unmarshalling the original record from this column, it can be"
+ + " accessed by another application to retrieve
the information contained in these additional fields.");
}
writer.write(