Skip to content

Commit

Permalink
refactor(persistence): Unify Jedis/Dynomite Repos (#2070)
Browse files Browse the repository at this point in the history
Having separate Jedis vs. Dynomite execution repositories posed a number of
problems around live migrations in a dual repository configuration.

This was partially due to the Dynomite repository using a different
scheme for key names, in order to utilize Dynomite hash sets, I.e.
[pipeline:abc-123, pipeline:abc-123:stageIndex] turns into
[{pipeline:abc-123}, {pipeline:abc-123}:stageIndex]. To support
live migrations, we need to be able to find executions in either
the current or previous store regardless of type or key names.
This implements that logic, as well as the ability to generate key
names based on the class type of each configured RedisClientDelegate.
This should enable Redis <---> Dynomite migrations in either direction.
  • Loading branch information
asher committed Mar 21, 2018
1 parent b12d9ee commit f285690
Show file tree
Hide file tree
Showing 10 changed files with 642 additions and 842 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import rx.schedulers.Schedulers;
import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UP;

// TODO @afeldman - refactor around RedisClientDelegate
abstract public class AbstractPollingNotificationAgent implements ApplicationListener<RemoteStatusChangedEvent> {

private final Logger log = LoggerFactory.getLogger(AbstractPollingNotificationAgent.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Collection;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.netflix.spinnaker.kork.jedis.RedisClientDelegate;
import com.netflix.spinnaker.orca.ExecutionStatus;
import com.netflix.spinnaker.orca.pipeline.model.Execution;
import com.netflix.spinnaker.orca.pipeline.model.Execution.ExecutionType;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.netflix.spinnaker.orca.pipeline.persistence;

public class UnsupportedRepositoryException extends RuntimeException {
public UnsupportedRepositoryException(String message) { super(message); }

public UnsupportedRepositoryException(String message, Throwable cause) { super(message, cause); }
}

This file was deleted.

Loading

0 comments on commit f285690

Please sign in to comment.