Skip to content

Feature: Chained synchronization - #290

Open
gliljas wants to merge 1 commit into
madelson:masterfrom
gliljas:composite
Open

gliljas wants to merge 1 commit into
madelson:masterfrom
gliljas:composite

Conversation

@gliljas

@gliljas gliljas commented Oct 15, 2026 •

Copy link
Copy Markdown

I started this branch like two years ago, but other things got in the way. The idea is to enable chaining of two or more synchronization providers, so that locks and semaphores must be acquired by all included providers. They fail or succeed together. Since I started, the CompositeDistributedSynchronizationHandle was added, and I could remove a lot of my code and use that instead.

So, what's the use case? We used it (a separate wrapper that I ended up with) when doing a rolling migration from one Azure lock account to another, and we're using it again now to migrate from Azure to Redis. All seamless, since we can ensure that locks are acquired in both places during the migration.

The second use case I see is that it together with the In Process provider (#291 ) enables us to not consume resources on the shared state if the lock was already acquired by the same process. Simply add the in process provider as the first in the chain.

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.

1 participant