NehanPathan opened a new issue, #1169: URL: https://github.com/apache/lucenenet/issues/1169
### Is there an existing issue for this? - [x] I have searched the existing issues ### Is your feature request related to a problem? Please describe the problem. Currently, IReplicationService.Perform and IReplicationResponse.Flush are synchronous. In modern .NET applications, blocking synchronous calls can reduce scalability and responsiveness, especially for I/O-bound replication operations. I am trying to implement a background replication server using Kestrel and ASP.NET Core. Without asynchronous support, calls to Perform block the thread, limiting concurrency and scalability. Moreover, synchronous usage in ASP.NET Core requires AllowSynchronousIO = true on Kestrel, which is discouraged and may be disabled in future framework versions. ### Describe the solution you'd like Introduce asynchronous methods: ->Task IReplicationService.PerformAsync(IReplicationRequest request, IReplicationResponse response, CancellationToken cancellationToken = default) ->Task IReplicationResponse.FlushAsync(CancellationToken cancellationToken = default) These methods should use the existing I/O streams asynchronously (WriteAsync, CopyToAsync, etc.) and accept an optional CancellationToken. ### Additional context This change allows Lucene.NET replication to be used efficiently in modern .NET applications (ASP.NET Core, background services) without blocking threads and without needing AllowSynchronousIO = true. Existing synchronous methods would remain for backward compatibility. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
