Skip to content

Added proper dolt_branch_control functionality#2443

Merged
Hydrocharged merged 1 commit intomainfrom
daylon/dolt_branch_control
Mar 12, 2026
Merged

Added proper dolt_branch_control functionality#2443
Hydrocharged merged 1 commit intomainfrom
daylon/dolt_branch_control

Conversation

@Hydrocharged
Copy link
Copy Markdown
Collaborator

Fixes:

This fixes two primary issues with dolt_branch_control. The first is that we'd error when encountering a destination GMS type, as we make the assumption that all GMS types have been handled once we reach a certain point in the analyzer. This is false for Dolt system tables that may be modified, so now cast those types to their closest Doltgres type for analysis.

The second fix deals with how superusers are handled between Doltgres and GMS. Doltgres uses its own permission model since it's fundamentally different than GMS' model, but dolt_branch_control internally checks for a superuser (or pseudo-superuser) to allow some commands without explicit privileges given. This adds a layer of indirection so that checks for superusers specifically will work as expected.

@Hydrocharged Hydrocharged requested a review from zachmu March 11, 2026 09:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 11, 2026

Main PR
covering_index_scan_postgres 580.02/s 578.86/s -0.2%
index_join_postgres 122.92/s 122.76/s -0.2%
index_join_scan_postgres 181.50/s 181.88/s +0.2%
index_scan_postgres 11.01/s 11.11/s +0.9%
oltp_point_select 2400.74/s 2400.58/s -0.1%
oltp_read_only 1719.79/s 1723.73/s +0.2%
select_random_points 111.73/s 111.12/s -0.6%
select_random_ranges 447.53/s 448.72/s +0.2%
table_scan_postgres 10.85/s 10.91/s +0.5%
types_table_scan_postgres 5.03/s 5.04/s +0.1%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 11, 2026

Main PR
Total 42090 42090
Successful 17674 17675
Failures 24416 24415
Partial Successes1 5575 5575
Main PR
Successful 41.9910% 41.9933%
Failures 58.0090% 58.0067%

${\color{lightgreen}Progressions (1)}$

random

QUERY: (SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1)
INTERSECT
(SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1)
INTERSECT
(SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1);

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread server/analyzer/assign_insert_casts.go
Comment thread server/auth/gms_privilege_set.go
Comment thread server/auth/gms_privilege_set.go
Comment thread server/auth/gms_privilege_set.go Outdated
@Hydrocharged Hydrocharged force-pushed the daylon/dolt_branch_control branch from abd5de1 to 059de82 Compare March 11, 2026 23:38
@Hydrocharged Hydrocharged force-pushed the daylon/dolt_branch_control branch from 059de82 to c7ce7d5 Compare March 11, 2026 23:42
@Hydrocharged Hydrocharged enabled auto-merge March 11, 2026 23:42
@Hydrocharged Hydrocharged merged commit d0ee709 into main Mar 12, 2026
17 checks passed
@Hydrocharged Hydrocharged deleted the daylon/dolt_branch_control branch March 12, 2026 00:45
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.

INSERT INTO dolt_branch_control fails with "non-Doltgres type found in destination

2 participants