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

chore(dynomite): Removing dynomite from codebase #741

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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