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

Bug fix: ref conflict can cause tags to be temporarily removed on a replica #8788

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Jan 24, 2025

The read replica code that compares remote refs and local refs to determine which local refs need to be deleted when synchronizing a read replica from a remote had a problem where certain patterns of ref names could cause the code to select the wrong local refs to remove. These removed refs would not be present on the replica until a future synchronization run recreated them.

The fix for this is to use the Ref.String() method (instead of Ref.GetPath()) to get a unique identifier for the ref (e.g. refs/tags/t1) and to ensure that the remote and local ref lists are both sorted by that unique identifier.

@coffeegoddd
Copy link
Contributor

@fulghum DOLT

comparing_percentages
100.000000 to 100.000000
version result total
95032b2 ok 5937457
version total_tests
95032b2 5937457
correctness_percentage
100.0

@dolthub dolthub deleted a comment from coffeegoddd Jan 24, 2025
Copy link
Contributor

@jycor jycor left a comment

Choose a reason for hiding this comment

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

LGTM

@fulghum fulghum merged commit 38a9d93 into main Jan 24, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants