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: replication fails when a branch is deleted and tag with same name is created #8653

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Dec 7, 2024

Our logic to update refs in a read replica was tracking updated refs by path, so when branch b1 was deleted and tag b1 was added, the code was mixing them up and trying to update the branch with the tag ref.

The fix is to track replicated refs by ID, instead of by path, to avoid collisions. This also changes the first return parameter of the pullBranches function, but none of the three places that call this function assign that first return param to a variable, so that change doesn't affect anything.

…s with the same name will have the same path
@fulghum fulghum force-pushed the fulghum/replica-bug-fix branch from 28a5510 to cf1edd8 Compare December 7, 2024 01:42
@fulghum fulghum marked this pull request as ready for review December 7, 2024 01:50
@fulghum fulghum requested a review from reltuk December 7, 2024 02:09
@coffeegoddd
Copy link
Contributor

@fulghum DOLT

comparing_percentages
100.000000 to 100.000000
version result total
cf1edd8 ok 5937457
version total_tests
cf1edd8 5937457
correctness_percentage
100.0

@dolthub dolthub deleted a comment from coffeegoddd Dec 7, 2024
Copy link
Contributor

@reltuk reltuk left a comment

Choose a reason for hiding this comment

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

This definitely seems more correct. Thanks for tackling it!

LGTM!

@fulghum fulghum merged commit f82d484 into main Dec 9, 2024
21 checks passed
@fulghum fulghum deleted the fulghum/replica-bug-fix branch December 9, 2024 03:22
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