You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/05/04 08:18:06 UTC

[GitHub] [lucene] ChristophKaser opened a new pull request #124: LUCENE-9951: Add InfoStream to ReplicationService

ChristophKaser opened a new pull request #124:
URL: https://github.com/apache/lucene/pull/124


   An InfoStream is added to the ReplicationService (similar to the ReplicationClient) to allow debugging replication issues
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Lucene:
   
   * https://issues.apache.org/jira/projects/LUCENE
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * LUCENE-####: <short description of problem or changes>
   
   LUCENE must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   Adds InfoStream to ReplicationService to facilitate debugging
   
   # Solution
   
   
   # Tests
   
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/lucene/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Lucene maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] ChristophKaser commented on a change in pull request #124: LUCENE-9951: Add InfoStream to ReplicationService

Posted by GitBox <gi...@apache.org>.
ChristophKaser commented on a change in pull request #124:
URL: https://github.com/apache/lucene/pull/124#discussion_r625635261



##########
File path: lucene/replicator/src/java/org/apache/lucene/replicator/http/ReplicationService.java
##########
@@ -183,6 +203,17 @@ public void perform(HttpServletRequest req, HttpServletResponse resp)
           break;
       }
     } catch (Exception e) {
+      if (infoStream.isEnabled(INFO_STREAM_COMPONENT)) {
+        final StringWriter sw = new StringWriter();
+        sw.append("an error occurred during replication service call (");
+        sw.append(req.getRequestURI());
+        if (req.getQueryString() != null) {
+          sw.append('?').append(req.getQueryString());
+        }
+        sw.append("): ");
+        e.printStackTrace(new PrintWriter(sw));

Review comment:
       There is no sensitive information in a replication request
   @muse-dev ignore




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] muse-dev[bot] commented on a change in pull request #124: LUCENE-9951: Add InfoStream to ReplicationService

Posted by GitBox <gi...@apache.org>.
muse-dev[bot] commented on a change in pull request #124:
URL: https://github.com/apache/lucene/pull/124#discussion_r625612737



##########
File path: lucene/replicator/src/java/org/apache/lucene/replicator/http/ReplicationService.java
##########
@@ -183,6 +203,17 @@ public void perform(HttpServletRequest req, HttpServletResponse resp)
           break;
       }
     } catch (Exception e) {
+      if (infoStream.isEnabled(INFO_STREAM_COMPONENT)) {
+        final StringWriter sw = new StringWriter();
+        sw.append("an error occurred during replication service call (");
+        sw.append(req.getRequestURI());
+        if (req.getQueryString() != null) {
+          sw.append('?').append(req.getQueryString());
+        }
+        sw.append("): ");
+        e.printStackTrace(new PrintWriter(sw));

Review comment:
       *INFORMATION_EXPOSURE_THROUGH_AN_ERROR_MESSAGE:*  Possible information exposure through an error message [(details)](https://find-sec-bugs.github.io/bugs.htm#INFORMATION_EXPOSURE_THROUGH_AN_ERROR_MESSAGE)
   (at-me [in a reply](https://docs.muse.dev/docs/talk-to-muse/) with `help` or `ignore`)




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] muse-dev[bot] commented on a change in pull request #124: LUCENE-9951: Add InfoStream to ReplicationService

Posted by GitBox <gi...@apache.org>.
muse-dev[bot] commented on a change in pull request #124:
URL: https://github.com/apache/lucene/pull/124#discussion_r625635306



##########
File path: lucene/replicator/src/java/org/apache/lucene/replicator/http/ReplicationService.java
##########
@@ -183,6 +203,17 @@ public void perform(HttpServletRequest req, HttpServletResponse resp)
           break;
       }
     } catch (Exception e) {
+      if (infoStream.isEnabled(INFO_STREAM_COMPONENT)) {
+        final StringWriter sw = new StringWriter();
+        sw.append("an error occurred during replication service call (");
+        sw.append(req.getRequestURI());
+        if (req.getQueryString() != null) {
+          sw.append('?').append(req.getQueryString());
+        }
+        sw.append("): ");
+        e.printStackTrace(new PrintWriter(sw));

Review comment:
       I've recorded this as ignored for this pull request. If you change your mind, just comment `@muse-dev unignore`.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org