You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2019/05/26 18:23:00 UTC

[jira] [Created] (LUCENE-8814) Use forbiddenapis to block explicit GCs

Shawn Heisey created LUCENE-8814:
------------------------------------

             Summary: Use forbiddenapis to block explicit GCs
                 Key: LUCENE-8814
                 URL: https://issues.apache.org/jira/browse/LUCENE-8814
             Project: Lucene - Core
          Issue Type: Improvement
          Components: general/build
            Reporter: Shawn Heisey
            Assignee: Shawn Heisey


Explicit GCs should not be allowed in production code.

We do have a number of System.gc() calls in Lucene and Solr tests, and in the Lucene benchmark.

I intend to block System.gc() and Runtime.gc() in the forbidden APIs configuration.  As part of that, I need to know whether the explicit calls in the test and benchmark code should be left there and allowed with SuppressForbidden, or if we should remove them.  My general thought is that production code will most likely not be doing explicit GCs, so tests shouldn't be doing it either ... but I didn't design those tests, so I can't claim to know the intent.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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