Commit Graph

18 Commits

Author SHA1 Message Date
Stefan Vodita 385f56ba22
Remove mention of SolrNamedThreadFactory (#13690) 2024-08-28 11:07:56 +01:00
Shubham Chaudhary 4b5917029f
Forbidden Thread.sleep API (#13001)
Co-authored-by: Shubham Chaudhary <cshbha@amazon.com>
2024-02-05 17:23:52 +01:00
Uwe Schindler e503805758
Remove usage and add some legacy java.util classes to forbiddenapis (Stack, Hashtable, Vector) (#12404) 2023-06-29 16:56:41 +02:00
Robert Muir 3ac71adbdf
Ban use of Math.fma across the entire codebase (#12014)
When FMA is not supported by the hardware, these methods fall back to
BigDecimal usage which causes them to be 2500x slower.

While most hardware in the last 10 years may have the support, out of
box both VirtualBox and QEMU don't pass thru FMA support (for the latter
at least you can tweak it with e.g. -cpu host or similar to fix this).

This creates a terrible undocumented performance trap. Prevent it from
sneaking into our codebase.
2022-12-17 08:01:22 -05:00
Robert Muir 0a9bb6e2ac
Disable useless error-prone checks (libraries/frameworks we do not use) (#11971)
These are easy/obvious ones to disable since we don't use the
functionality at all: the checks are literally useless.

This gives some performance boost to the error-prone, although it is
still pretty slow.

triage most of the previously disabled checks into TODO, noisy, etc
2022-12-01 08:46:23 -05:00
Marios Trivyzas dbffe3472b
LUCENE-10423: Remove usages of System.currentTimeMillis() from tests (#11749)
* Remove usages of System.currentTimeMillis() from tests

- Use Random from `RandomizedRunner` to be able to use a Seed to
  reproduce tests, instead of a seed coming from wall clock.
- Replace time based tests, using wall clock to determine periods
  with counter of repetitions, to have a consistent reproduction.

Closes: #11459

* address comments

* tune iterations

* tune iterations for nightly
2022-09-06 17:55:01 -04:00
Uwe Schindler 831ae2465b
Remove the deflater hack introduced because of JDK-8252739 (#977)
This bug was fixed in JDK-16 so it does not apply to main branch (Java 17) anymore.
2022-06-24 14:23:10 +02:00
Uwe Schindler ff263f0aa4
Upgrade to forbiddenapis 3.3 (#768) 2022-03-26 17:09:42 +01:00
Uwe Schindler 0b517573a4
LUCENE-10342: Add logging to static initializers to warn users if unmapping or object size calculation does not work (#572)
Co-authored-by: Tomoko Uchida <tomoko.uchida.1111@gmail.com>
2021-12-29 18:18:21 +01:00
Dawid Weiss fd685682be This removes the last of ant-compatibility hacks - cross-project dependency on test classes. Replaced with gradle's test fixture artifact sharing. Cleaned up spatial3d classes a bit too. 2021-03-30 12:35:33 +02:00
Mike Drob b335034615
Require Thread Names in Solr (#2264)
When we are creating a new thread we should give it a descriptive name and enforce this via ForbiddenAPIs. This doesn't apply to Runnable or Callable objects that we pass to an executor, since those should be getting named by the executor itself.

We don't require this in tests because the tests should be more self contained and there is less benefit in descriptive names. If somebody is already profiling a test, then they likely have the context to understand what the unnamed threads are doing, whereas a thread dump from a running Solr instance should have good thread names for everything. This is especially helpful when doing profiling, otherwise we end up with a bunch of Thread-# that are hard to tell apart and search on.
2021-01-28 15:04:15 -06:00
András Salamon 83e0397c42
SOLR-14297: Replace commons-codec Base64 with JDK8 Base64 (#2222) 2021-01-21 13:10:33 -05:00
Uwe Schindler 8debc9d0c2
LUCENE-9517: Don't subclass Deflater and instead create a patch for setDictionary() using a functional interface (#1850) 2020-09-10 11:12:59 +02:00
Shalin Shekhar Mangar 13f19f6555 SOLR-9906: SolrjNamedThreadFactory is deprecated in favor of SolrNamedThreadFactory. DefaultSolrThreadFactory is removed from solr-core in favor of SolrNamedThreadFactory in solrj package and all solr-core classes now use SolrNamedThreadFactory 2020-04-13 08:16:35 +05:30
Dawid Weiss 8906c2ddbe Merge forbidden APIs rules. 2019-12-17 13:39:10 +01:00
Dawid Weiss 0247f02a70 Only apply log4j rules to Solr. 2019-12-03 15:18:10 +01:00
Dawid Weiss a6d6d633d5 Apply servlet APIs to just Solr. 2019-12-03 14:43:50 +01:00
Dawid Weiss 6461909129 Port forbidden APIs. See gradlew :helpForbiddenApis to see how rules are applied automatically based on the set of dependencies of a project. 2019-12-03 14:40:35 +01:00