diff --git a/build.gradle b/build.gradle index 769c39be8..0c0624f6f 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ buildscript { plugin_previous_version = opensearch_previous_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') common_utils_version = System.getProperty("common_utils.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.3.72") + kotlin_version = System.getProperty("kotlin.version", "1.6.0") } diff --git a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt index 7c5de728e..0a513f512 100644 --- a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt @@ -21,6 +21,7 @@ import org.opensearch.replication.util.suspending import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.NonCancellable +import kotlinx.coroutines.ObsoleteCoroutinesApi import kotlinx.coroutines.cancel import kotlinx.coroutines.delay import kotlinx.coroutines.isActive @@ -178,6 +179,7 @@ abstract class CrossClusterReplicationTask(id: Long, type: String, action: Strin client.suspending(::updatePersistentTaskState)(state) } + @ObsoleteCoroutinesApi protected abstract suspend fun execute(scope: CoroutineScope, initialState: PersistentTaskState?) protected open suspend fun cleanup() {}