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 2020/08/24 16:25:54 UTC

[GitHub] [lucene-solr] s1monw commented on a change in pull request #1779: LUCENE-9478: Prevent DWPTDeleteQueue from referencing itself and leaking memory

s1monw commented on a change in pull request #1779:
URL: https://github.com/apache/lucene-solr/pull/1779#discussion_r475737638



##########
File path: lucene/core/src/test/org/apache/lucene/index/TestDocumentsWriterDeleteQueue.java
##########
@@ -36,6 +37,26 @@
  */
 public class TestDocumentsWriterDeleteQueue extends LuceneTestCase {
 
+
+  public void testAdvanceReferencesOriginal() {
+    WeakAndNext weakAndNext = new WeakAndNext();
+    DocumentsWriterDeleteQueue next = weakAndNext.next;
+    assertNotNull(next);
+    System.gc();

Review comment:
       this is terrible but I don't know of a better way of doing this. this at least works on my machine :) and would have found the issue




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