Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8814

Use forbiddenapis to block explicit GCs

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              elyograg Shawn Heisey
              Reporter:
              elyograg Shawn Heisey

              Dates

              • Created:
                Updated:

                Issue deployment