Skip to content

SOLR-16189: TestCancellableCollector thread leak#847

Merged
risdenk merged 1 commit intoapache:mainfrom
risdenk:SOLR-16189
May 10, 2022
Merged

SOLR-16189: TestCancellableCollector thread leak#847
risdenk merged 1 commit intoapache:mainfrom
risdenk:SOLR-16189

Conversation

@risdenk
Copy link
Contributor

@risdenk risdenk commented May 9, 2022

@risdenk risdenk self-assigned this May 9, 2022
Copy link
Contributor

@magibney magibney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; tangential/note: as I understand it, even with this PR I'd expect occasional (though less frequent) "leaked threads" detected from this test. See recent discussion re: tryTerminate(), on SOLR-15660.

Short version: iiuc there's no built-in way to actual block for thread death on ThreadPoolExecutor.tryTerminate(), so we either need to

  1. accept some threshold of false positives, or
  2. add some minimal ThreadLeakLinger to tests involving Executors, or
  3. add a randomizedtesting.ThreadFilter to detect and ignore these threads if possible, a la QuickPatchThreadsFilter, or
  4. do some fancy ThreadFactory footwork to actually detect thread death?

Not sure 4. is worth it.

That's all orthogonal to this PR though!

@risdenk risdenk merged commit f5e927e into apache:main May 10, 2022
@risdenk risdenk deleted the SOLR-16189 branch May 10, 2022 02:01
@atris
Copy link
Contributor

atris commented May 10, 2022

Thanks for taking a shot at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants