You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "original-brownbear (via GitHub)" <gi...@apache.org> on 2023/05/07 23:06:08 UTC

[GitHub] [lucene] original-brownbear opened a new pull request, #12270: Don't generate stacktrace in CollectionTerminatedException

original-brownbear opened a new pull request, #12270:
URL: https://github.com/apache/lucene/pull/12270

   Seems this exception is always ignored so there's no point in filling in a stack-trace for it.
   


-- 
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: issues-unsubscribe@lucene.apache.org

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] original-brownbear commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538083118

   > e.g. a stacktrace for it should never be requested.
   
   I'm a little hesitant to add an assertion for this to be honest, not sure what the effects would be, I've never seen that asserted. 
   But I do wonder, maybe we should go one step further here and just make this exception a singleton? That saves a couple more cycles and makes it ever clearer to people that they probably shouldn't use this for anything but their intended purpose?


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538425224

   > are you sure about TimeLimitingCollector.TimeExceededException? no, you are right :)


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1539665901

   Thanks @original-brownbear !


-- 
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: issues-unsubscribe@lucene.apache.org

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] original-brownbear commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538279283

   @javanna  are you sure about `TimeLimitingCollector.TimeExceededException`? How's that one specifically caught? Wouldn't you want to know where it came from if it bubbles up or is it always clear from the logic which collector caused it?


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538233895

   > Leave it like this maybe and fix up the other exception here also?
   
   ++, there's also `TimeLimitingCollector.TimeExceededException` I think


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna merged pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna merged PR #12270:
URL: https://github.com/apache/lucene/pull/12270


-- 
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: issues-unsubscribe@lucene.apache.org

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] original-brownbear commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538220195

   @javanna jup that's the downside of using a singleton for sure. The performance gain isn't worth it IMO as this is almost free without the stacktrace generation.
   
   Leave it like this maybe and fix up the other exception here also?


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538698786

   Can you also add an entry to `CHANGES.txt` please?


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538025392

   This makes sense to me, it looks like the only way that this exception is exposed to users is through misuse. I wonder if we should try and prevent misusing this exception, somehow try and enforce that it is only ever created and thrown but always caught e.g. a stacktrace for it should never be requested.


-- 
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: issues-unsubscribe@lucene.apache.org

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] original-brownbear commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "original-brownbear (via GitHub)" <gi...@apache.org>.
original-brownbear commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538707169

   Sure done in https://github.com/apache/lucene/pull/12270/commits/b45840ce3c8c47164424088e472088e2631cf27e :) 


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538216674

   Actually, I have second thoughts about making this a singleton, because exceptions have public methods like `initCause` and `setStacktrace` which change the internal state of the exception. I guess my initial concerns about misusing the exception would stay the same, and making it a singleton would make those possibly worse because misuse could cause changes to the shared instance. 


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1538210577

   > But I do wonder, maybe we should go one step further here and just make this exception a singleton? 
   
   sounds good to me. We could do the same with `TimeLimitingBulkScorer.TimeExceededException` as well.


-- 
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: issues-unsubscribe@lucene.apache.org

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] javanna commented on pull request #12270: Don't generate stacktrace in CollectionTerminatedException

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #12270:
URL: https://github.com/apache/lucene/pull/12270#issuecomment-1564135251

   I opened #12335 for TimeExceededException.


-- 
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: issues-unsubscribe@lucene.apache.org

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