Skip to content

Async version of IReplicator (IAsyncReplicator) and ReplicationClient #1181

@paulirwin

Description

@paulirwin

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Just like #1169 but for the client side of things.

We need an async Task-based API for doing replication client operations to avoid synchronous HTTP code that can deadlock or cause other issues.

Describe the solution you'd like

Note that IReplicationHandler can remain synchronous, since that calls into Lucene.NET APIs that do not have async equivalents at this time.

We can make an async version of IReplicator (as a new IAsyncReplicator interface) for the calls that hit the replication server, and expose async methods on ReplicationClient that call those methods on IAsyncReplicator.

As for whether or not this is all done in the same ReplicationClient class, or if it gets an i.e. AsyncReplicationClient version (with or without a refactored-out base class), is up for discussion.

Additionally, HttpClientBase and HttpReplicator would need to be made async-ified, and HttpReplicator could implement IAsyncReplicator without needing a separate Async class in my opinion.

Additional context

This code is called by our new Lucene.Net.Extensions replicator client library, which is a work in progress for merging in the Google Summer of Code 2025 project work.

cc @NehanPathan @NightOwl888

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions