diff --git a/source/Databricks/documents/release-notes/release-notes.md b/source/Databricks/documents/release-notes/release-notes.md index 4acd80cc1..f1f21655f 100644 --- a/source/Databricks/documents/release-notes/release-notes.md +++ b/source/Databricks/documents/release-notes/release-notes.md @@ -1,5 +1,9 @@ # Databricks Release Notes +## Version 11.2.4 + +- Fix overflow of backoff value. + ## Version 11.2.3 - Skip tests diff --git a/source/Databricks/source/Jobs/Jobs.csproj b/source/Databricks/source/Jobs/Jobs.csproj index 13b1f241b..08c7953b4 100644 --- a/source/Databricks/source/Jobs/Jobs.csproj +++ b/source/Databricks/source/Jobs/Jobs.csproj @@ -31,7 +31,7 @@ limitations under the License. Energinet.DataHub.Core.Databricks.Jobs - 11.2.3$(VersionSuffix) + 11.2.4$(VersionSuffix) Databricks Jobs Energinet-DataHub Energinet-DataHub diff --git a/source/Databricks/source/SqlStatementExecution/SqlStatementExecution.csproj b/source/Databricks/source/SqlStatementExecution/SqlStatementExecution.csproj index 61d778314..3c53f8076 100644 --- a/source/Databricks/source/SqlStatementExecution/SqlStatementExecution.csproj +++ b/source/Databricks/source/SqlStatementExecution/SqlStatementExecution.csproj @@ -30,7 +30,7 @@ limitations under the License. Energinet.DataHub.Core.Databricks.SqlStatementExecution - 11.2.3$(VersionSuffix) + 11.2.4$(VersionSuffix) Databricks SQL Statement Execution Energinet-DataHub Energinet-DataHub diff --git a/source/Databricks/source/SqlStatementExecution/Statement/DatabricksStatementRequest.cs b/source/Databricks/source/SqlStatementExecution/Statement/DatabricksStatementRequest.cs index ef7310dbe..c6e8de543 100644 --- a/source/Databricks/source/SqlStatementExecution/Statement/DatabricksStatementRequest.cs +++ b/source/Databricks/source/SqlStatementExecution/Statement/DatabricksStatementRequest.cs @@ -65,12 +65,17 @@ public async ValueTask WaitForSqlWarehouseResultAsy { DatabricksStatementResponse? response = null; var fibonacci = new Fibonacci(); + var currentDelay = 0; + do { try { - var delayInMilliseconds = Math.Min(fibonacci.GetNextNumber() * 10, MaxWaitTimeForLoopInMilliseconds); - response = await GetResponseFromDataWarehouseAsync(client, endpoint, response, delayInMilliseconds, cancellationToken).ConfigureAwait(false); + currentDelay = currentDelay < MaxWaitTimeForLoopInMilliseconds + ? fibonacci.GetNextNumber() * 10 + : MaxWaitTimeForLoopInMilliseconds; + + response = await GetResponseFromDataWarehouseAsync(client, endpoint, response, currentDelay, cancellationToken).ConfigureAwait(false); if (response.IsSucceeded) return response; @@ -103,9 +108,6 @@ private async Task GetResponseFromDataWarehouseAsyn int delayInMilliseconds, CancellationToken cancellationToken) { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(delayInMilliseconds, nameof(delayInMilliseconds)); - ArgumentOutOfRangeException.ThrowIfGreaterThan(delayInMilliseconds, MaxWaitTimeForLoopInMilliseconds, nameof(delayInMilliseconds)); - if (response == null) { // No cancellation token is used because we want to wait for the result