Skip to content

fix(db): set slices.query_context to MEDIUMTEXT for mysql#20779

Merged
ktmud merged 1 commit into
apache:masterfrom
airbnb:mysql-slice-query-context-mediumtext
Jul 20, 2022
Merged

fix(db): set slices.query_context to MEDIUMTEXT for mysql#20779
ktmud merged 1 commit into
apache:masterfrom
airbnb:mysql-slice-query-context-mediumtext

Conversation

@ktmud
Copy link
Copy Markdown
Member

@ktmud ktmud commented Jul 19, 2022

SUMMARY

Follow up for #20761, changing Slice.query_context and Slice.params to MEDIUMTEXT for MySQL databases. Ideally this should be ran before #20359 and #20346 but that would mean rebasing the existing migrations, which could be problematic for users who already ran both migrations.

We'll just accept the risk that some MySQL users may lose query_context data if they didn't manually run this column type change before #20359 and #20346...

On Airbnb's Superset instance with about 350k slices, this migration completes in about 50 seconds.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@ktmud ktmud requested a review from a team as a code owner July 19, 2022 22:46
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 19, 2022

Codecov Report

Merging #20779 (f4fc2ba) into master (1d9d505) will decrease coverage by 11.48%.
The diff coverage is n/a.

❗ Current head f4fc2ba differs from pull request most recent head 8b2c592. Consider uploading reports for the commit 8b2c592 to get more accurate results

@@             Coverage Diff             @@
##           master   #20779       +/-   ##
===========================================
- Coverage   66.28%   54.79%   -11.49%     
===========================================
  Files        1756     1756               
  Lines       66737    66737               
  Branches     7049     7049               
===========================================
- Hits        44238    36571     -7667     
- Misses      20702    28369     +7667     
  Partials     1797     1797               
Flag Coverage Δ
hive 53.27% <ø> (ø)
postgres ?
presto 53.13% <ø> (ø)
python 57.84% <ø> (-23.68%) ⬇️
sqlite ?
unit 50.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) ⬇️
superset/key_value/commands/update.py 0.00% <0.00%> (-88.89%) ⬇️
superset/key_value/commands/delete.py 0.00% <0.00%> (-85.30%) ⬇️
superset/key_value/commands/delete_expired.py 0.00% <0.00%> (-80.77%) ⬇️
superset/dashboards/commands/importers/v0.py 15.62% <0.00%> (-76.25%) ⬇️
superset/datasets/commands/update.py 25.30% <0.00%> (-68.68%) ⬇️
superset/datasets/commands/create.py 29.41% <0.00%> (-68.63%) ⬇️
superset/datasets/commands/importers/v0.py 24.03% <0.00%> (-67.45%) ⬇️
superset/reports/commands/execute.py 24.45% <0.00%> (-67.16%) ⬇️
superset/dashboards/dao.py 31.38% <0.00%> (-64.24%) ⬇️
... and 277 more

@ktmud ktmud merged commit a64cdec into apache:master Jul 20, 2022
@john-bodley john-bodley deleted the mysql-slice-query-context-mediumtext branch February 17, 2023 22:16
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 First shipped in 2.1.0 labels Mar 13, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0 First shipped in 2.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants