apache / apache/lucene

Add an InfoStream to ReplicationService to facilitate debugging [LUCENE-9951]

Open
#10,990 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:replicator type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

At the moment, when an exception occurs during replication, the ReplicationService tries to serialize it and send it to the client, which then reports it.

This does not work when the exception occurs after the first part of the response has already been sent, or if there was a network error. In these cases, the exception is silently ignored (on the server side), and the client side will report a TruncatedChunkException, making it hard to find the exact cause of the problem.

I propose to add an InfoStream to the ReplicationService (analogous to the ReplicationClient) which will log requests and errors that are sent back to the client.

I will provide a PR for this issue.

---
Migrated from [LUCENE-9951](https://issues.apache.org/jira/browse/LUCENE-9951) by Christoph Kaser
Pull requests: https://github.com/apache/lucene/pull/124

Contributor guide

Open the contributing guide

Research direction

Start by reading ReplicationService and compare its behavior with the analogous ReplicationClient InfoStream. Trace the request and error paths described in the issue; the work is done when server-side requests and errors sent back to the client are logged, including failures after part of a response is sent or after a network error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.