Skip to content

Commit

Permalink
log multiInstanceExecute state (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
himadieievsv authored Jan 16, 2024
1 parent b4f95a4 commit 39ebe69
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.himadieiev.redpulsar.core.utils.withTimeoutInThread
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import mu.KotlinLogging
import java.time.Duration
import java.util.Collections
import kotlin.system.measureTimeMillis
Expand Down Expand Up @@ -59,6 +60,9 @@ suspend inline fun <T : Backend, R> multiInstanceExecute(
waiter(jobs)
}
val validity = timeout.toMillis() - timeDiff - clockDrift
val logger = KotlinLogging.logger { }
logger.info { "Validity: $validity, Result size: ${results.size}" }
logger.info { "Results: $results" }
if (results.size < quorum || validity < 0) {
val cleanUpJobs = mutableListOf<Job>()
backends.forEach { backend ->
Expand Down

0 comments on commit 39ebe69

Please sign in to comment.