Skip to content

Conversation

@machine424
Copy link
Contributor

@machine424 machine424 commented Mar 25, 2021

fixes #1420
I can see the default privileges now.
I don't see how to easily test this, maybe the preparedDatabases feature needs some e2e tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this, this does not do anything and imho the comment is also not correct, the defer part comes post init.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the defer part comes post init I didn't get it?
I was trying to say that, in case we enter in the loop in line 666, the first initDbConnWithName in line 667 will try to close the connection we open in line 612 and that this defer will close the last connection that we open in line 667 so we don't need to add another close.
I'll remove it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove it if it confuses Jan ;)
I think from the code it should be clear that the last connection opened in this method will be closed in the defer part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, and to underline the fact that initDbConnWithName (tries to) does close the conn before creating another one so we don't risk a conn risk.
Done.

@machine424 machine424 force-pushed the cata branch 2 times, most recently from c91b7dd to 279d96f Compare March 26, 2021 12:47
@FxKu
Copy link
Member

FxKu commented Mar 26, 2021

👍

1 similar comment
@Jan-M
Copy link
Member

Jan-M commented Mar 26, 2021

👍

@Jan-M Jan-M merged commit 78bfba8 into zalando:master Mar 26, 2021
@Jan-M
Copy link
Member

Jan-M commented Mar 26, 2021

Thank you @machine424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default privileges are not set in public schema

3 participants