apache / cloudberry

One advanced and mature open-source MPP (Massively Parallel Processing) database. Open source alternative to Greenplum Database.
https://cloudberry.apache.org
Apache License 2.0
430 stars 104 forks source link

Update gpshrink: fix reference before assignment #636

Closed reshke closed 1 month ago

reshke commented 2 months ago

In theory, Exception can be raised before gpshrink_db_status is assigned:


Traceback (most recent call last):
  File "/usr/local/gpdb/bin/gpshrink", line 1509, in <module>
    main(options, args, parser)
  File "/usr/local/gpdb/bin/gpshrink", line 1477, in main
    if not (gpshrink_db_status is None):
UnboundLocalError: local variable 'gpshrink_db_status' referenced before assignment

fix #ISSUE_Number


Change logs

Describe your change clearly, including what problem is being solved or what feature is being added.

If it has some breaking backward or forward compatibility, please clary.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

If yes, please clarify the previous behavior and the change this PR proposes.

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

reshke commented 2 months ago

I want to restart icw-orca-test, i don't think there is a valid error, just flap. I did f75cf99a073537e3894ce4220d0ab3fa3511ef26 commit to stabilize cbdb external_fts pipeline test suite, because is also flaps frequently due to excepted/actual plan mismatch.

lss602726449 commented 1 month ago

Thanks for fixing this problem. For merge, we'd better squash the first two commit.