-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handle NumberFormatException in debezium while updating sequence max value for sequence on non-integer column #2360
Conversation
…r sequence column in debezium Added a test case for it
sequenceMax.put(seqName, Math.max(sequenceMax.get(seqName), columnValue)); | ||
} catch (NumberFormatException e) { | ||
//Skipping the sequences that are not on Integer columns | ||
LOGGER.info("Skipping unsupported sequence with non-interger value: '{}'", seqName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps DEBUG would be better? otherwise this would come up for every single row.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, okay
columnValue = Long.valueOf(value); | ||
sequenceMax.put(seqName, Math.max(sequenceMax.get(seqName), columnValue)); | ||
} catch (NumberFormatException e) { | ||
//Skipping the sequences that are not on Integer columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add more context in the comment on the type of sequences and why they could fail with a NumberFormatException?
@@ -214,4 +214,39 @@ WITH region_list AS ( | |||
amount[1 + mod(n, array_length(amount, 1))], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test already running in live migration & offline with BETA_FAST_DATA_EXPORT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only Offline with Beta_fast mode, we don't run pg_sequences test for live-migration currently
Describe the changes in this pull request
Skipping the max value update for sequences that are non-Integer columns in debezium.
fixes - https://yugabyte.atlassian.net/browse/DB-15398
Describe if there are any user-facing changes
No
How was this pull request tested?
Added an offline test for PG
Does your PR have changes that can cause upgrade issues?