Skip to content

Conversation

@ShahabT
Copy link
Contributor

@ShahabT ShahabT commented May 27, 2025

What changed?

ApplyTaskQueueUserDataReplicationEvent was not handling the case when the replication data only contains Versioning V3 config.

Why?

Above

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

None

@ShahabT ShahabT requested a review from a team as a code owner May 27, 2025 18:15
Copy link
Contributor

@carlydf carlydf left a comment

Choose a reason for hiding this comment

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

this makes sense to me -- sounds like you're adding tests

I'm assuming that mergedUserData is always non-nil in these two places?

@dnr dnr changed the title Fis nil pointer in user data replication Fix nil pointer in user data replication May 27, 2025
if req.GetUserData().GetClock() == nil || current.GetClock() != nil && hlc.Greater(current.GetClock(), req.GetUserData().GetClock()) {
mergedData.AssignmentRules = currentVersioningData.GetAssignmentRules()
mergedData.RedirectRules = currentVersioningData.GetRedirectRules()
if mergedData != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is slightly confusing: you would expect the check to be "if currentVersioningData assignment rules or redirect rules are not nil: ...", but if they are then mergedData must not be nil either, so it works (and is simpler this way).

It'll be very nice to remove V1 and V2 🙂

@ShahabT ShahabT enabled auto-merge (squash) May 27, 2025 21:17
@ShahabT ShahabT merged commit e76c17c into main May 27, 2025
60 checks passed
@ShahabT ShahabT deleted the shahab/replication-nil-v3 branch May 27, 2025 21:35
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.

4 participants