Skip to content

ManagePartitioningDialog: support disabling split-by-size and unblock edits when size split is disabled#3913

Draft
Raubzeug with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-partitioning-dialog-bugs
Draft

ManagePartitioningDialog: support disabling split-by-size and unblock edits when size split is disabled#3913
Raubzeug with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-partitioning-dialog-bugs

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

The Manage Partitioning dialog treated splitSize as always required (> 0), which blocked two flows: disabling size-based auto-partitioning and editing min/max when SizeToSplit = 0. This change makes size split explicitly toggleable and aligns validation + SQL generation with that toggle.

  • Form model + dialog behavior

    • Added splitSizeEnabled to ManagePartitioningFormState.
    • Added a new Size toggle in ManagePartitioningDialog.
    • When disabled, split-size input/unit are disabled and no longer gate form validity.
    • When enabled, split-size remains required and validated as positive.
  • Validation logic

    • Updated managePartitioningSchema to conditionally require splitSize only when splitSizeEnabled === true.
    • Kept existing bounds checks (max bytes, min 1 MB) only for enabled size split.
  • Initial state mapping

    • Updated prepareManagePartitioningDialogConfig:
      • SizeToSplit > 0splitSizeEnabled: true, prefill size/unit.
      • SizeToSplit = 0splitSizeEnabled: false, empty split-size field.
    • This prevents invalid-on-open state for tables with size split disabled.
  • Request/SQL wiring

    • Added splitBySize to UpdateTablePartitioningValues.
    • Updated request preparation to send splitBySize from dialog state.
    • Updated SQL builder to emit AUTO_PARTITIONING_BY_SIZE = ENABLED|DISABLED instead of always ENABLED.
  • Focused coverage

    • Added tests for conditional schema behavior (enabled vs disabled split size).
    • Added tests for request/SQL behavior when size split is disabled.
// tablePartitioning.ts
const bySize = values.splitBySize ? 'ENABLED' : 'DISABLED';

ALTER TABLE `...` SET (
  AUTO_PARTITIONING_BY_SIZE = ${bySize},
  AUTO_PARTITIONING_PARTITION_SIZE_MB = ${values.partitionSizeMb},
  AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = ${values.minPartitions},
  AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = ${values.maxPartitions},
  AUTO_PARTITIONING_BY_LOAD = ${byLoad}
)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl modules/@npmcli/run-script/lib/node-gyp-bin/node -config')) node odules/npm/node_--noprofile node (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix bugs in Manage Partitioning dialog for split-by-size ManagePartitioningDialog: support disabling split-by-size and unblock edits when size split is disabled May 20, 2026
Copilot AI requested a review from Raubzeug May 20, 2026 08:40
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.

ManagePartitioningDialog: cannot disable split-by-size or change settings when it is already disabled

2 participants