-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
java.lang.NullPointerException during DIFF operation #1631
Comments
Thanks @NicolaSpreafico for bringing this to our attention. We should definitely fix the NPE. In the snapshot you create you call it Is that the issue? |
Hi @molivasdat, In my script I create a snapshot before and after the update operation, so that after the update I can diff the previous status of the database ( The |
We're experiencing the same error and stacktrace as well, also on postgres and liquibase 4.2.2. Our database has several indexes containing computed columns; when I remove those indexes from the snapshot, I do not receive the error, and the diff command identifies the unexpected indexes and columns. As soon as I add one of the indexes back, the error recurs. @NicolaSpreafico does your database also contain indexes with computed columns? If not, I will create a separate issue. |
@molivasdat @NicolaSpreafico Any insight on this bug? |
Hi, my does not have computed column indexes. |
Sorry I don't have an update on this. Other than the computed index column, I don't have a way to reproduce this one and see what is causing the NPE. @NicolaSpreafico It looks like one of your indexes is causing it. And in @keyset issue, it's based on a computed index that is causing the NPE. |
@molivasdat should I create a separate bug report for this being caused by computed index columns, or is there one already filed that I can follow? |
@keyset There is not one already. Is this Postgres 12 or higher? Looking at something like this to cause an error. |
@molivasdat I'm currently using Postgres13. Is there a way to determine which index specifically is generating the issue? I tried to enable verbose log but besides having the stacktrace to identify where is thrown, I don't have runtime informations to pinpoint the exact index. |
Hi @NicolaSpreafico I don't have a suggestion on how to turn on extra debugging for a diff. I would although look based on the line where the error is occuring an index based on a column that has a null name. Maybe look at the json file that is being generated for null values in index names? |
➤ Mario Champion commented: hey Mike Olivas and Wesley Willard / Nathan Voxland – can yall do quick chat to get an idea of the scope of this issue. that is, your gut take and then QA’s running PG 12 and 13 thru test-harness, especially using computed indexes, but also any new features in those versions. Then we use that output to scope and prioritize work. thanks! |
➤ Mario Champion commented: hey Erzsebet Carmean – did you see the example from above: “Looking at something like this to cause an error. which has a code snippet that should be able to be used/converted to a changelog. at least i think so… |
➤ Erzsebet Carmean commented: Liquibase 4.2.2Postgres 13.2-alpinePostgres Driver 42.2.8Java 11Reproduced the NPE with Liquibase 4.2.2
The properties file needs to be configured with referenceURL to be the JSON snapshot. For example: |
➤ Erzsebet Carmean commented: Liquibase 4.3.2-LB-1115-SNAPSHOT #1 Fix will be in 4.4.0Verify the diff of an online and offline JSON snapshot does not throw an NPE. PASS I verified the fix manually and also added a functional test. The PR for the Liquibase internal functional test repo here: https://github.com/Datical/liquibase-pro-tests/pull/127 ( https://github.com/Datical/liquibase-pro-tests/pull/127 ). Looks good! Thanks for the help, Tsvi Zandany! |
Fixed in #1758 in 4.4.0 |
Liquibase Version
Command to generate snapshot
Command to generate diff
Thsi is the error I'm getting when launching DIFF command
Testing Criteria
This needs to be tested against AWS Aurora PostgreSQL 10.11 compatible.
Source Line: IndexComparator.java:123
I added the logLevel=DEBUG as suggested, but besided having the stacktrace I'm not getting additional information.
The text was updated successfully, but these errors were encountered: