diff --git a/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutProperties.pdl b/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutProperties.pdl new file mode 100644 index 0000000000..379ad199f3 --- /dev/null +++ b/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutProperties.pdl @@ -0,0 +1,16 @@ +namespace com.linkedin.d2 + +/** + * Loosely typed model containing data that controls the failout state an application. + */ +record D2FailoutProperties { + /** + * Routing data for offline partitions. + */ + failoutRedirectConfigs: array[ map[string, D2FailoutPropertiesConfigValue]] + + /** + * Batch of buckets to failout. + */ + failoutBucketConfigs: array[ map[string, D2FailoutPropertiesConfigValue]] +} diff --git a/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutPropertiesConfigValue.pdl b/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutPropertiesConfigValue.pdl new file mode 100644 index 0000000000..93491a312f --- /dev/null +++ b/d2-schemas/src/main/pegasus/com/linkedin/d2/D2FailoutPropertiesConfigValue.pdl @@ -0,0 +1,7 @@ +namespace com.linkedin.d2 + + +/** + * Weakly typed configValue containing failout data (Later to be converted in to a strongly typed object). + */ +typeref D2FailoutPropertiesConfigValue = union[longValue: long, intValue: int, stringValue: string, mapValue: map[string, int]] diff --git a/d2/src/test/java/com/linkedin/d2/balancer/clients/TestBackupRequestsClient.java b/d2/src/test/java/com/linkedin/d2/balancer/clients/TestBackupRequestsClient.java index fa724d643c..8ad9590d70 100644 --- a/d2/src/test/java/com/linkedin/d2/balancer/clients/TestBackupRequestsClient.java +++ b/d2/src/test/java/com/linkedin/d2/balancer/clients/TestBackupRequestsClient.java @@ -62,6 +62,7 @@ import com.linkedin.r2.transport.common.bridge.common.TransportCallback; import com.linkedin.r2.transport.common.bridge.common.TransportResponseImpl; import com.linkedin.test.util.retry.SingleRetry; +import com.linkedin.test.util.retry.ThreeRetries; import com.linkedin.util.clock.SystemClock; import java.io.IOException; import java.net.URI; @@ -233,7 +234,7 @@ public void onSuccess(StreamResponse result) { /** * Backup Request should still work when a hint is given together with the flag indicating that the hint is only a preference, not requirement. */ - @Test(invocationCount = 3, dataProvider = "isD2Async", retryAnalyzer = SingleRetry.class) // Appears to be flaky in CI + @Test(invocationCount = 3, dataProvider = "isD2Async", retryAnalyzer = ThreeRetries.class) // Appears to be flaky in CI public void testRequestWithHint(boolean isD2Async) throws Exception { int responseDelayNano = 100000000; //1s till response comes back @@ -425,7 +426,7 @@ private static long busyWaitUntil(long nextNano) } } - @Test(dataProvider = "isD2Async") + @Test(dataProvider = "isD2Async", retryAnalyzer = ThreeRetries.class) public void testStatsConsumerAddRemove(boolean isD2Async) throws Exception { AtomicReference serviceProperties = new AtomicReference<>();