mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Fix deleted domain bug in recurring billing expansion
Currently, the recurring billing expansion chokes when looking for existing OneTime events for domains that are deleted or transferred at the MR execution time. To fix this, change the FKI query to look for a key at either execution time or recurrence end time, whichever is earliest. (This one is distinct from [] in that this bug occurs when domains are [] deleted.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143693153
This commit is contained in:
parent
270734fd9b
commit
00dab551d7
2 changed files with 43 additions and 2 deletions
|
@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkArgument;
|
|||
import static com.google.common.collect.Sets.difference;
|
||||
import static google.registry.mapreduce.MapreduceRunner.PARAM_DRY_RUN;
|
||||
import static google.registry.mapreduce.inputs.EppResourceInputs.createChildEntityInput;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.common.Cursor.CursorType.RECURRING_BILLING;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost;
|
||||
|
@ -167,8 +166,14 @@ public class ExpandRecurringBillingEventsAction implements Runnable {
|
|||
|
||||
Iterable<OneTime> oneTimesForDomain = ofy().load()
|
||||
.type(OneTime.class)
|
||||
.ancestor(recurring.getParentKey().getParent());
|
||||
/*
|
||||
.ancestor(loadByForeignKey(
|
||||
DomainResource.class, recurring.getTargetId(), executeTime));
|
||||
DomainResource.class,
|
||||
recurring.getTargetId(),
|
||||
// Whether or not a domain currently exists, it always exists one millisecond
|
||||
// before the recurrence end time.
|
||||
recurring.getRecurrenceEndTime().minusMillis(1))); */
|
||||
|
||||
// Determine the billing times that already have OneTime events persisted.
|
||||
ImmutableSet<DateTime> existingBillingTimes =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue