Skip to content
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

Partially revert 'Remove N+1 in sync' #38549

Closed
wants to merge 4 commits into from
Closed

Conversation

crisptrutski
Copy link
Contributor

Refences:

Description

This PR reverts some components of #37439

  1. We rollback the breaking changes metabase.driver.sql-jdbc.sync.interface/active-tables which added a new argument. We will need to maintain backwards compatibility for 3 releases, so will need to introduce a new multi-method instead.
  2. We remove the select privileges check from those methods, which required the breaking change, and which we believe is responsible for the two issues linked above.
  3. We disable :table-privilegesfor Redshift for now, but leave the queries.

@crisptrutski crisptrutski requested review from qnkhuat, calherries and a team February 8, 2024 11:51
@crisptrutski crisptrutski added the backport Automatically create PR on current release branch on merge label Feb 8, 2024
@metabase-bot metabase-bot bot added the .Team/BackendComponents also known as BEC label Feb 8, 2024
@@ -15,8 +15,7 @@
[database :- (mi/InstanceOf :model/Database)]
(let [driver (driver.u/database->driver database)]
(when (and (not= :redshift driver)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the redshift exclusion now and the comment below, so this is just

    (when (driver/database-supports? driver :table-privileges database) ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I intentionally updated the comment and left this so we didn't unintentionally enable it if we roll the other changes forward again.

@qnkhuat
Copy link
Contributor

qnkhuat commented Feb 8, 2024

Are we sure we want to revert this for PG and redshift too? see my comment

crisptrutski and others added 2 commits February 8, 2024 14:19
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
@crisptrutski
Copy link
Contributor Author

We have decided against this approach, as it would revert much needed Redshift sync optimization, and we are not aware of any defects in its table-privileges implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/BackendComponents also known as BEC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants