Skip to content

Commit

Permalink
chore(dynomite): Removing dynomite from codebase (#741)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
robzienert and mergify[bot] committed May 12, 2020
1 parent bdb77d0 commit ef62c2d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 213 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ All these metrics can be grouped by a `monitor` tag (e.g. `DockerMonitor`, `Jenk
The following storage backends are supported:

- Redis
- Dynomite

Relevant properties:
```
Expand Down
1 change: 0 additions & 1 deletion igor-web/igor-web.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dependencies {
implementation "com.netflix.spinnaker.kork:kork-stackdriver"
implementation "com.netflix.spinnaker.kork:kork-web"
implementation "com.netflix.spinnaker.kork:kork-jedis"
implementation "com.netflix.spinnaker.kork:kork-dynomite"
implementation "com.netflix.spinnaker.kork:kork-telemetry"
implementation "com.netflix.spinnaker.kork:kork-hystrix"
implementation "com.netflix.spinnaker.kork:kork-secrets-aws"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@

import static java.lang.String.format;

import com.netflix.dyno.connectionpool.CursorBasedResult;
import com.netflix.dyno.connectionpool.exception.DynoException;
import com.netflix.dyno.jedis.DynoJedisClient;
import com.netflix.spinnaker.igor.IgorConfigurationProperties;
import com.netflix.spinnaker.kork.dynomite.DynomiteClientDelegate;
import com.netflix.spinnaker.kork.jedis.RedisClientDelegate;
import java.time.Duration;
import java.util.List;
Expand Down Expand Up @@ -134,9 +130,6 @@ private void migrateBatch(List<DockerRegistryV1Key> oldKeys) {
*/
private int getV1Keys(MultiKeyCommands client) {
try {
if (redis instanceof DynomiteClientDelegate) {
return v1Keys((DynoJedisClient) client);
}
return v1Keys((Jedis) client);
} catch (InterruptedException e) {
log.error("Migration could not complete because it was interrupted", e);
Expand All @@ -160,38 +153,6 @@ private int getV1Keys(MultiKeyCommands client) {
return size;
};

/** Dynomite-compat v1keys */
private int v1Keys(DynoJedisClient dyno) throws InterruptedException {
int numMigrated = 0;
int failures = 0;

String pattern = oldIndexPattern();
CursorBasedResult<String> result = null;
do {
try {
// This is a really weird interface.
if (result == null) {
result = dyno.dyno_scan(pattern);
} else {
result = dyno.dyno_scan(result, 10, pattern);
}

numMigrated += oldKeysCallback.apply(result.getResult());
failures = 0;
} catch (DynoException e) {
failures++;
if (failures >= 5) {
log.error("Failed migrating v1 key batch after 5 attempts, aborting", e);
throw new AbortedAfterExcessiveFailures(e);
}
log.error("Failed migrating v1 key batch, retrying", e);
Thread.sleep(5000);
}
} while (result == null || !result.isComplete());

return numMigrated;
}

/** Redis-compat v1keys */
private int v1Keys(Jedis jedis) throws InterruptedException {
int numMigrated = 0;
Expand Down

0 comments on commit ef62c2d

Please sign in to comment.