Skip to content

Implementing better concurrency#163

Open
zambrovski wants to merge 6 commits intodevelopfrom
feature/embedded-concurrency
Open

Implementing better concurrency#163
zambrovski wants to merge 6 commits intodevelopfrom
feature/embedded-concurrency

Conversation

@zambrovski
Copy link
Copy Markdown
Contributor

@zambrovski zambrovski commented Feb 27, 2026

@zambrovski zambrovski marked this pull request as ready for review March 23, 2026 23:23
@zambrovski zambrovski added Prio: MUST Feature is essential for the milestone. Type: bug Something isn't working labels Mar 23, 2026
@zambrovski zambrovski added this to the 2026.02.2 milestone Mar 23, 2026
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Conditional
import org.springframework.stereotype.Component
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably unused?

commandExecutor = commandExecutor,

)
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)
)

}
keep
}
.map { (lockedTask, activeSubscription) -> createTaskActionHandlerCallable(lockedTask, activeSubscription!!) }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!! signifies for me still a kind of danger, that a NullPointer could be thrown, even if this is prevented due to the filter above. however, we could remove the !! by rewriting the filter with a mapNotNull from the beginning

val taskActionHandlerCallables = lockedTasks
    .asSequence()
    .mapNotNull { lockedTask ->
        val subscription = subscriptions.firstOrNull { it.matches(lockedTask) }
        if (subscription != null) {
            lockedTask to subscription
        } else {
            metrics.incrementDroppedTasksCounter(lockedTask.topicName!!, NO_MATCHING_SUBSCRIPTIONS)
            null
        }
    }
    .map { (lockedTask, activeSubscription) -> createTaskActionHandlerCallable(lockedTask, activeSubscription) }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. However, a lot of formatting has changed and the reason for that is unclear to me.

}

internal fun deliverNewTasks() {
val subscriptions = subscriptionRepository.getTaskSubscriptions().filter { s -> s.taskType==TaskType.EXTERNAL }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val subscriptions = subscriptionRepository.getTaskSubscriptions().filter { s -> s.taskType==TaskType.EXTERNAL }
val subscriptions = subscriptionRepository.getTaskSubscriptions().filter { s -> s.taskType == TaskType.EXTERNAL }

Found a bunch of weirdly formatted comparisons all across this merge request. Is this this project's formatter setting? If so, I need to update mine.

fun ProcessInstanceWithVariablesDto.toProcessInformation() = ProcessInformation(
instanceId = this.id!!,
meta = mapOf(
meta = metaOf(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I create an MR to copy this over to the remote code? I remember adding it only for TaskInformation, not for ProcessInformation. Does that exist in remote too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Prio: MUST Feature is essential for the milestone. Type: bug Something isn't working

Projects

None yet

4 participants