Skip to content

Support CHECK CONSTRAINTS options and Fix Error aborting Cycle in TSQL Bulk Copy#2596

Merged
KushaalShroff merged 7 commits intobabelfish-for-postgresql:BABEL_4_X_DEVfrom
amazon-aurora:babel-4200-jira
May 23, 2024
Merged

Support CHECK CONSTRAINTS options and Fix Error aborting Cycle in TSQL Bulk Copy#2596
KushaalShroff merged 7 commits intobabelfish-for-postgresql:BABEL_4_X_DEVfrom
amazon-aurora:babel-4200-jira

Conversation

@KushaalShroff
Copy link
Copy Markdown
Contributor

@KushaalShroff KushaalShroff commented May 21, 2024

Description

This commit has the following changes:

  1. Fix Permissions checking missed in d95b7ad
  2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
  3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com

Issues Resolved

BABEL-4200, BABEL-4991

Test Scenarios Covered

  • Use case based -
    Yes

  • Boundary conditions -
    Yes

  • Arbitrary inputs -

  • Negative test cases -

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Client tests -

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 22, 2024

Pull Request Test Coverage Report for Build 9199093451

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 72.896%

Totals Coverage Status
Change from base Build 9194919730: 0.08%
Covered Lines: 41905
Relevant Lines: 57486

💛 - Coveralls

@KushaalShroff KushaalShroff changed the title Fix Permission checks and error handling in TSQL Bulk Copy Support CHECK CONSTRAINTS options and Fix Error aborting Cycle in TSQL Bulk Copy May 22, 2024
@KushaalShroff KushaalShroff merged commit 2b6e11e into babelfish-for-postgresql:BABEL_4_X_DEV May 23, 2024
@KushaalShroff KushaalShroff deleted the babel-4200-jira branch May 23, 2024 09:36
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 28, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 28, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 29, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 29, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 29, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request May 29, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
KushaalShroff added a commit to amazon-aurora/babelfish_extensions that referenced this pull request Jun 27, 2024
…L Bulk Copy (babelfish-for-postgresql#2596)

This commit has the following changes:

1. Fix Permissions checking missed in d95b7ad
2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved
BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
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.

3 participants