Skip to content

Conversation

@JoshVanL
Copy link
Contributor

Update the loop implementation to use an optimistic RLock for enqueueing, falling back to a full Lock only when the queue segment is full. This reduces lock contention.

Uses a generic typed Factory to allow for the loop to be sync.Pool cached by the consumer, on demand. The loop does not cache itself as the loop may continue to be used after being closed.

Update the loop implementation to use an optimistic RLock for
enqueueing, falling back to a full Lock only when the queue segment is
full. This reduces lock contention.

Uses a generic typed Factory to allow for the loop to be sync.Pool
cached by the consumer, on demand. The loop does not cache itself as the
loop may continue to be used after being closed.

Signed-off-by: joshvanl <[email protected]>
@JoshVanL JoshVanL requested review from a team as code owners November 21, 2025 17:10
JoshVanL added a commit to JoshVanL/go-etcd-cron that referenced this pull request Nov 21, 2025
Update github.com/dapr/kit to use the new Loop Factory implementation,
improving lock contention.

Uses fork dapr/kit#140

Signed-off-by: joshvanl <[email protected]>
JoshVanL added a commit to JoshVanL/dapr that referenced this pull request Nov 21, 2025
Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from dapr#9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>
Copy link
Contributor

@cicoyle cicoyle left a comment

Choose a reason for hiding this comment

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

lgtm

@cicoyle cicoyle merged commit 3ac186d into dapr:main Nov 24, 2025
6 checks passed
cicoyle pushed a commit to diagridio/go-etcd-cron that referenced this pull request Nov 24, 2025
* kit/events/loop: Use factory

Update github.com/dapr/kit to use the new Loop Factory implementation,
improving lock contention.

Uses fork dapr/kit#140

Signed-off-by: joshvanl <[email protected]>

* Update github.com/dapr/kit to ORIGIN HEAD

Signed-off-by: joshvanl <[email protected]>

* nix update gomod2nix.toml

Signed-off-by: joshvanl <[email protected]>

* Eventually wait for precision jobs to no longer exist

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
JoshVanL added a commit to JoshVanL/dapr that referenced this pull request Dec 2, 2025
Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from dapr#9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>
JoshVanL added a commit to JoshVanL/dapr that referenced this pull request Dec 4, 2025
Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from dapr#9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>
JoshVanL added a commit to JoshVanL/dapr that referenced this pull request Dec 5, 2025
Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from dapr#9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>
cicoyle pushed a commit to dapr/dapr that referenced this pull request Dec 5, 2025
* Scheduler: Namespaces loop

Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from #9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>

* Wait for actors to be registered before retention config not exists

Signed-off-by: joshvanl <[email protected]>

* Update github.com/dapr/kit to origin HEAD

Signed-off-by: joshvanl <[email protected]>

* Update github.com/diagridio/go-etcd-cron to point to origin HEAD

Signed-off-by: joshvanl <[email protected]>

* De-duplicate scheduler logging

Signed-off-by: joshvanl <[email protected]>

* Update durabletask-go to origin head

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
JoshVanL added a commit to JoshVanL/dapr that referenced this pull request Dec 5, 2025
Creates a new control loop 'namespaces' which is used to managing the
connection pool for each namespace. This loop enables further
implementation of broadcast jobs which require fanning out triggering
across a single namespace set. The namespace scoping has been removed
from the connections loop stream store.

Uses the kit & go-etcd-cron for the kit update to improve memory
allocations and lock contention.
diagridio/go-etcd-cron#101
dapr/kit#140

Branched from dapr#9200

Does not change behaviour.

Signed-off-by: joshvanl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants